Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 1 | package androidx.paging { |
| 2 | |
| 3 | public abstract class DataSource<Key, Value> { |
| 4 | method public void addInvalidatedCallback(androidx.paging.DataSource.InvalidatedCallback); |
| 5 | method public void invalidate(); |
| 6 | method public boolean isInvalid(); |
| 7 | method public abstract <ToValue> androidx.paging.DataSource<Key, ToValue> map(androidx.arch.core.util.Function<Value, ToValue>); |
| 8 | method public abstract <ToValue> androidx.paging.DataSource<Key, ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>, java.util.List<ToValue>>); |
| 9 | method public void removeInvalidatedCallback(androidx.paging.DataSource.InvalidatedCallback); |
| 10 | } |
| 11 | |
| 12 | public static abstract class DataSource.Factory<Key, Value> { |
| 13 | ctor public DataSource.Factory(); |
| 14 | method public abstract androidx.paging.DataSource<Key, Value> create(); |
| 15 | method public <ToValue> androidx.paging.DataSource.Factory<Key, ToValue> map(androidx.arch.core.util.Function<Value, ToValue>); |
| 16 | method public <ToValue> androidx.paging.DataSource.Factory<Key, ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>, java.util.List<ToValue>>); |
| 17 | } |
| 18 | |
| 19 | public static abstract interface DataSource.InvalidatedCallback { |
| 20 | method public abstract void onInvalidated(); |
| 21 | } |
| 22 | |
| 23 | public abstract class ItemKeyedDataSource<Key, Value> extends androidx.paging.DataSource { |
| 24 | ctor public ItemKeyedDataSource(); |
| 25 | method public abstract Key getKey(Value); |
| 26 | method public abstract void loadAfter(androidx.paging.ItemKeyedDataSource.LoadParams<Key>, androidx.paging.ItemKeyedDataSource.LoadCallback<Value>); |
| 27 | method public abstract void loadBefore(androidx.paging.ItemKeyedDataSource.LoadParams<Key>, androidx.paging.ItemKeyedDataSource.LoadCallback<Value>); |
| 28 | method public abstract void loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams<Key>, androidx.paging.ItemKeyedDataSource.LoadInitialCallback<Value>); |
| 29 | method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key, ToValue> map(androidx.arch.core.util.Function<Value, ToValue>); |
| 30 | method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key, ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>, java.util.List<ToValue>>); |
| 31 | } |
| 32 | |
| 33 | public static abstract class ItemKeyedDataSource.LoadCallback<Value> { |
| 34 | ctor public ItemKeyedDataSource.LoadCallback(); |
| 35 | method public abstract void onResult(java.util.List<Value>); |
| 36 | } |
| 37 | |
| 38 | public static abstract class ItemKeyedDataSource.LoadInitialCallback<Value> extends androidx.paging.ItemKeyedDataSource.LoadCallback { |
| 39 | ctor public ItemKeyedDataSource.LoadInitialCallback(); |
| 40 | method public abstract void onResult(java.util.List<Value>, int, int); |
| 41 | } |
| 42 | |
| 43 | public static class ItemKeyedDataSource.LoadInitialParams<Key> { |
| 44 | ctor public ItemKeyedDataSource.LoadInitialParams(Key, int, boolean); |
| 45 | field public final boolean placeholdersEnabled; |
| 46 | field public final Key requestedInitialKey; |
| 47 | field public final int requestedLoadSize; |
| 48 | } |
| 49 | |
| 50 | public static class ItemKeyedDataSource.LoadParams<Key> { |
| 51 | ctor public ItemKeyedDataSource.LoadParams(Key, int); |
| 52 | field public final Key key; |
| 53 | field public final int requestedLoadSize; |
| 54 | } |
| 55 | |
| 56 | public abstract class PageKeyedDataSource<Key, Value> extends androidx.paging.DataSource { |
| 57 | ctor public PageKeyedDataSource(); |
| 58 | method public abstract void loadAfter(androidx.paging.PageKeyedDataSource.LoadParams<Key>, androidx.paging.PageKeyedDataSource.LoadCallback<Key, Value>); |
| 59 | method public abstract void loadBefore(androidx.paging.PageKeyedDataSource.LoadParams<Key>, androidx.paging.PageKeyedDataSource.LoadCallback<Key, Value>); |
| 60 | method public abstract void loadInitial(androidx.paging.PageKeyedDataSource.LoadInitialParams<Key>, androidx.paging.PageKeyedDataSource.LoadInitialCallback<Key, Value>); |
| 61 | method public final <ToValue> androidx.paging.PageKeyedDataSource<Key, ToValue> map(androidx.arch.core.util.Function<Value, ToValue>); |
| 62 | method public final <ToValue> androidx.paging.PageKeyedDataSource<Key, ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>, java.util.List<ToValue>>); |
| 63 | } |
| 64 | |
| 65 | public static abstract class PageKeyedDataSource.LoadCallback<Key, Value> { |
| 66 | ctor public PageKeyedDataSource.LoadCallback(); |
| 67 | method public abstract void onResult(java.util.List<Value>, Key); |
| 68 | } |
| 69 | |
| 70 | public static abstract class PageKeyedDataSource.LoadInitialCallback<Key, Value> { |
| 71 | ctor public PageKeyedDataSource.LoadInitialCallback(); |
| 72 | method public abstract void onResult(java.util.List<Value>, int, int, Key, Key); |
| 73 | method public abstract void onResult(java.util.List<Value>, Key, Key); |
| 74 | } |
| 75 | |
| 76 | public static class PageKeyedDataSource.LoadInitialParams<Key> { |
| 77 | ctor public PageKeyedDataSource.LoadInitialParams(int, boolean); |
| 78 | field public final boolean placeholdersEnabled; |
| 79 | field public final int requestedLoadSize; |
| 80 | } |
| 81 | |
| 82 | public static class PageKeyedDataSource.LoadParams<Key> { |
| 83 | ctor public PageKeyedDataSource.LoadParams(Key, int); |
| 84 | field public final Key key; |
| 85 | field public final int requestedLoadSize; |
| 86 | } |
| 87 | |
| 88 | public abstract class PagedList<T> extends java.util.AbstractList { |
| 89 | method public void addWeakCallback(java.util.List<T>, androidx.paging.PagedList.Callback); |
| 90 | method public void detach(); |
| 91 | method public T get(int); |
| 92 | method public androidx.paging.PagedList.Config getConfig(); |
| 93 | method public abstract androidx.paging.DataSource<?, T> getDataSource(); |
| 94 | method public abstract java.lang.Object getLastKey(); |
| 95 | method public int getPositionOffset(); |
| 96 | method public boolean isDetached(); |
| 97 | method public boolean isImmutable(); |
| 98 | method public void loadAround(int); |
| 99 | method public void removeWeakCallback(androidx.paging.PagedList.Callback); |
| 100 | method public int size(); |
| 101 | method public java.util.List<T> snapshot(); |
| 102 | } |
| 103 | |
| 104 | public static abstract class PagedList.BoundaryCallback<T> { |
| 105 | ctor public PagedList.BoundaryCallback(); |
| 106 | method public void onItemAtEndLoaded(T); |
| 107 | method public void onItemAtFrontLoaded(T); |
| 108 | method public void onZeroItemsLoaded(); |
| 109 | } |
| 110 | |
| 111 | public static final class PagedList.Builder<Key, Value> { |
| 112 | ctor public PagedList.Builder(androidx.paging.DataSource<Key, Value>, androidx.paging.PagedList.Config); |
| 113 | ctor public PagedList.Builder(androidx.paging.DataSource<Key, Value>, int); |
| 114 | method public androidx.paging.PagedList<Value> build(); |
| 115 | method public androidx.paging.PagedList.Builder<Key, Value> setBoundaryCallback(androidx.paging.PagedList.BoundaryCallback); |
| 116 | method public androidx.paging.PagedList.Builder<Key, Value> setFetchExecutor(java.util.concurrent.Executor); |
| 117 | method public androidx.paging.PagedList.Builder<Key, Value> setInitialKey(Key); |
| 118 | method public androidx.paging.PagedList.Builder<Key, Value> setNotifyExecutor(java.util.concurrent.Executor); |
| 119 | } |
| 120 | |
| 121 | public static abstract class PagedList.Callback { |
| 122 | ctor public PagedList.Callback(); |
| 123 | method public abstract void onChanged(int, int); |
| 124 | method public abstract void onInserted(int, int); |
| 125 | method public abstract void onRemoved(int, int); |
| 126 | } |
| 127 | |
| 128 | public static class PagedList.Config { |
Chris Craik | e8ca38c | 2018-05-22 18:08:16 -0700 | [diff] [blame^] | 129 | field public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 130 | field public final boolean enablePlaceholders; |
| 131 | field public final int initialLoadSizeHint; |
Chris Craik | e8ca38c | 2018-05-22 18:08:16 -0700 | [diff] [blame^] | 132 | field public final int maxSize; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 133 | field public final int pageSize; |
| 134 | field public final int prefetchDistance; |
| 135 | } |
| 136 | |
| 137 | public static final class PagedList.Config.Builder { |
| 138 | ctor public PagedList.Config.Builder(); |
| 139 | method public androidx.paging.PagedList.Config build(); |
| 140 | method public androidx.paging.PagedList.Config.Builder setEnablePlaceholders(boolean); |
| 141 | method public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(int); |
Chris Craik | e8ca38c | 2018-05-22 18:08:16 -0700 | [diff] [blame^] | 142 | method public androidx.paging.PagedList.Config.Builder setMaxSize(int); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 143 | method public androidx.paging.PagedList.Config.Builder setPageSize(int); |
| 144 | method public androidx.paging.PagedList.Config.Builder setPrefetchDistance(int); |
| 145 | } |
| 146 | |
| 147 | public abstract class PositionalDataSource<T> extends androidx.paging.DataSource { |
| 148 | ctor public PositionalDataSource(); |
| 149 | method public static int computeInitialLoadPosition(androidx.paging.PositionalDataSource.LoadInitialParams, int); |
| 150 | method public static int computeInitialLoadSize(androidx.paging.PositionalDataSource.LoadInitialParams, int, int); |
| 151 | method public abstract void loadInitial(androidx.paging.PositionalDataSource.LoadInitialParams, androidx.paging.PositionalDataSource.LoadInitialCallback<T>); |
| 152 | method public abstract void loadRange(androidx.paging.PositionalDataSource.LoadRangeParams, androidx.paging.PositionalDataSource.LoadRangeCallback<T>); |
| 153 | method public final <V> androidx.paging.PositionalDataSource<V> map(androidx.arch.core.util.Function<T, V>); |
| 154 | method public final <V> androidx.paging.PositionalDataSource<V> mapByPage(androidx.arch.core.util.Function<java.util.List<T>, java.util.List<V>>); |
| 155 | } |
| 156 | |
| 157 | public static abstract class PositionalDataSource.LoadInitialCallback<T> { |
| 158 | ctor public PositionalDataSource.LoadInitialCallback(); |
| 159 | method public abstract void onResult(java.util.List<T>, int, int); |
| 160 | method public abstract void onResult(java.util.List<T>, int); |
| 161 | } |
| 162 | |
| 163 | public static class PositionalDataSource.LoadInitialParams { |
| 164 | ctor public PositionalDataSource.LoadInitialParams(int, int, int, boolean); |
| 165 | field public final int pageSize; |
| 166 | field public final boolean placeholdersEnabled; |
| 167 | field public final int requestedLoadSize; |
| 168 | field public final int requestedStartPosition; |
| 169 | } |
| 170 | |
| 171 | public static abstract class PositionalDataSource.LoadRangeCallback<T> { |
| 172 | ctor public PositionalDataSource.LoadRangeCallback(); |
| 173 | method public abstract void onResult(java.util.List<T>); |
| 174 | } |
| 175 | |
| 176 | public static class PositionalDataSource.LoadRangeParams { |
| 177 | ctor public PositionalDataSource.LoadRangeParams(int, int); |
| 178 | field public final int loadSize; |
| 179 | field public final int startPosition; |
| 180 | } |
| 181 | |
| 182 | } |
| 183 | |