Jeff Gaston | 5d65a6a | 2019-01-23 13:44:15 -0500 | [diff] [blame] | 1 | // Signature format: 3.0 |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 2 | package androidx.paging { |
| 3 | |
| 4 | public abstract class DataSource<Key, Value> { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 5 | method @AnyThread public void addInvalidatedCallback(androidx.paging.DataSource.InvalidatedCallback onInvalidatedCallback); |
Dustin Lam | 7b116f5 | 2019-06-12 13:51:31 -0700 | [diff] [blame] | 6 | method @AnyThread public final void addInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 7 | method protected final java.util.concurrent.Executor getExecutor(); |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 8 | method @AnyThread public void invalidate(); |
| 9 | method @WorkerThread public boolean isInvalid(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 10 | method public boolean isRetryableError(Throwable error); |
Dustin Lam | d847ca6 | 2019-06-24 14:53:17 -0700 | [diff] [blame^] | 11 | method public abstract suspend Object load$lintWithKotlin(androidx.paging.DataSource.Params<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 12 | method public <ToValue> androidx.paging.DataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 13 | method public <ToValue> androidx.paging.DataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 14 | method public <ToValue> androidx.paging.DataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 15 | method public <ToValue> androidx.paging.DataSource<Key,ToValue> mapByPage(kotlin.jvm.functions.Function1<? super java.util.List<? extends Value>,? extends java.util.List<? extends ToValue>> function); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 16 | method @AnyThread public void removeInvalidatedCallback(androidx.paging.DataSource.InvalidatedCallback onInvalidatedCallback); |
Dustin Lam | 7b116f5 | 2019-06-12 13:51:31 -0700 | [diff] [blame] | 17 | method @AnyThread public final void removeInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 18 | property protected final java.util.concurrent.Executor executor; |
| 19 | property @WorkerThread public boolean isInvalid; |
| 20 | } |
| 21 | |
| 22 | public static class DataSource.BaseResult<Value> { |
| 23 | ctor protected DataSource.BaseResult(java.util.List<? extends Value> data, Object? prevKey, Object? nextKey, int leadingNulls, int trailingNulls, int offset, boolean counted); |
| 24 | method public final boolean getCounted(); |
| 25 | method public final int getLeadingNulls(); |
| 26 | method public final Object? getNextKey(); |
| 27 | method public final int getOffset(); |
| 28 | method public final Object? getPrevKey(); |
| 29 | method public final int getTrailingNulls(); |
| 30 | field public final java.util.List<Value> data; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 31 | } |
| 32 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 33 | public abstract static class DataSource.Factory<Key, Value> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 34 | ctor public DataSource.Factory(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 35 | method public abstract androidx.paging.DataSource<Key,Value> create(); |
| 36 | method public <ToValue> androidx.paging.DataSource.Factory<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 37 | method public <ToValue> androidx.paging.DataSource.Factory<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 38 | method public <ToValue> androidx.paging.DataSource.Factory<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 39 | method public <ToValue> androidx.paging.DataSource.Factory<Key,ToValue> mapByPage(kotlin.jvm.functions.Function1<? super java.util.List<? extends Value>,? extends java.util.List<? extends ToValue>> function); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 40 | } |
| 41 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 42 | public static interface DataSource.InvalidatedCallback { |
| 43 | method @AnyThread public void onInvalidated(); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 44 | } |
| 45 | |
Dustin Lam | d847ca6 | 2019-06-24 14:53:17 -0700 | [diff] [blame^] | 46 | public static final class DataSource.Params<K> { |
| 47 | method public int getInitialLoadSize(); |
| 48 | method public K? getKey(); |
| 49 | method public int getPageSize(); |
| 50 | method public boolean getPlaceholdersEnabled(); |
| 51 | } |
| 52 | |
Dustin Lam | 7b116f5 | 2019-06-12 13:51:31 -0700 | [diff] [blame] | 53 | public final class DataSourceKt { |
| 54 | ctor public DataSourceKt(); |
| 55 | } |
| 56 | |
Dustin Lam | 9a972d7 | 2019-06-20 08:40:12 -0700 | [diff] [blame] | 57 | public abstract class ItemKeyedDataSource<Key, Value> extends androidx.paging.DataSource<Key,Value> { |
Chris Craik | 557c882 | 2018-10-25 15:04:03 -0700 | [diff] [blame] | 58 | ctor public ItemKeyedDataSource(); |
Dustin Lam | 9a972d7 | 2019-06-20 08:40:12 -0700 | [diff] [blame] | 59 | method public abstract Key getKey(Value item); |
Dustin Lam | d847ca6 | 2019-06-24 14:53:17 -0700 | [diff] [blame^] | 60 | method public final suspend Object load$lintWithKotlin(androidx.paging.DataSource.Params<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 61 | method public abstract void loadAfter(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadCallback<Value> callback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 62 | method public abstract void loadBefore(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadCallback<Value> callback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 63 | method public abstract void loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadInitialCallback<Value> callback); |
| 64 | method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 65 | method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 66 | method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 67 | method public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> mapByPage(kotlin.jvm.functions.Function1<? super java.util.List<? extends Value>,? extends java.util.List<? extends ToValue>> function); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 68 | } |
| 69 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 70 | public abstract static class ItemKeyedDataSource.LoadCallback<Value> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 71 | ctor public ItemKeyedDataSource.LoadCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 72 | method public void onError(Throwable error); |
| 73 | method public abstract void onResult(java.util.List<? extends Value> data); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 74 | } |
| 75 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 76 | public abstract static class ItemKeyedDataSource.LoadInitialCallback<Value> extends androidx.paging.ItemKeyedDataSource.LoadCallback<Value> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 77 | ctor public ItemKeyedDataSource.LoadInitialCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 78 | method public abstract void onResult(java.util.List<? extends Value> data, int position, int totalCount); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 79 | } |
| 80 | |
Dustin Lam | 9a972d7 | 2019-06-20 08:40:12 -0700 | [diff] [blame] | 81 | public static class ItemKeyedDataSource.LoadInitialParams<Key> { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 82 | ctor public ItemKeyedDataSource.LoadInitialParams(Key? requestedInitialKey, int requestedLoadSize, boolean placeholdersEnabled); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 83 | field public final boolean placeholdersEnabled; |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 84 | field public final Key? requestedInitialKey; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 85 | field public final int requestedLoadSize; |
| 86 | } |
| 87 | |
Dustin Lam | 9a972d7 | 2019-06-20 08:40:12 -0700 | [diff] [blame] | 88 | public static class ItemKeyedDataSource.LoadParams<Key> { |
| 89 | ctor public ItemKeyedDataSource.LoadParams(Key key, int requestedLoadSize); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 90 | field public final Key key; |
| 91 | field public final int requestedLoadSize; |
| 92 | } |
| 93 | |
Dustin Lam | 4dcef65 | 2019-06-20 08:33:55 -0700 | [diff] [blame] | 94 | public abstract class PageKeyedDataSource<Key, Value> extends androidx.paging.DataSource<Key,Value> { |
Chris Craik | 557c882 | 2018-10-25 15:04:03 -0700 | [diff] [blame] | 95 | ctor public PageKeyedDataSource(); |
Dustin Lam | d847ca6 | 2019-06-24 14:53:17 -0700 | [diff] [blame^] | 96 | method public final suspend Object load$lintWithKotlin(androidx.paging.DataSource.Params<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<Value>> p); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 97 | method public abstract void loadAfter(androidx.paging.PageKeyedDataSource.LoadParams<Key> params, androidx.paging.PageKeyedDataSource.LoadCallback<Key,Value> callback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 98 | method public abstract void loadBefore(androidx.paging.PageKeyedDataSource.LoadParams<Key> params, androidx.paging.PageKeyedDataSource.LoadCallback<Key,Value> callback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 99 | method public abstract void loadInitial(androidx.paging.PageKeyedDataSource.LoadInitialParams<Key> params, androidx.paging.PageKeyedDataSource.LoadInitialCallback<Key,Value> callback); |
| 100 | method public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 101 | method public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 102 | method public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 103 | method public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> mapByPage(kotlin.jvm.functions.Function1<? super java.util.List<? extends Value>,? extends java.util.List<? extends ToValue>> function); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 104 | } |
| 105 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 106 | public abstract static class PageKeyedDataSource.LoadCallback<Key, Value> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 107 | ctor public PageKeyedDataSource.LoadCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 108 | method public void onError(Throwable error); |
| 109 | method public abstract void onResult(java.util.List<? extends Value> data, Key? adjacentPageKey); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 110 | } |
| 111 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 112 | public abstract static class PageKeyedDataSource.LoadInitialCallback<Key, Value> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 113 | ctor public PageKeyedDataSource.LoadInitialCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 114 | method public void onError(Throwable error); |
| 115 | method public abstract void onResult(java.util.List<? extends Value> data, int position, int totalCount, Key? previousPageKey, Key? nextPageKey); |
| 116 | method public abstract void onResult(java.util.List<? extends Value> data, Key? previousPageKey, Key? nextPageKey); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 117 | } |
| 118 | |
Dustin Lam | 4dcef65 | 2019-06-20 08:33:55 -0700 | [diff] [blame] | 119 | public static class PageKeyedDataSource.LoadInitialParams<Key> { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 120 | ctor public PageKeyedDataSource.LoadInitialParams(int requestedLoadSize, boolean placeholdersEnabled); |
Dustin Lam | 4dcef65 | 2019-06-20 08:33:55 -0700 | [diff] [blame] | 121 | field public final boolean placeholdersEnabled; |
| 122 | field public final int requestedLoadSize; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 123 | } |
| 124 | |
Dustin Lam | 4dcef65 | 2019-06-20 08:33:55 -0700 | [diff] [blame] | 125 | public static class PageKeyedDataSource.LoadParams<Key> { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 126 | ctor public PageKeyedDataSource.LoadParams(Key key, int requestedLoadSize); |
Dustin Lam | 4dcef65 | 2019-06-20 08:33:55 -0700 | [diff] [blame] | 127 | field public final Key key; |
| 128 | field public final int requestedLoadSize; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 129 | } |
| 130 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 131 | public abstract class PagedList<T> extends java.util.AbstractList<T> { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 132 | method public void addWeakCallback(java.util.List<? extends T>? previousSnapshot, androidx.paging.PagedList.Callback callback); |
Dustin Lam | 7b116f5 | 2019-06-12 13:51:31 -0700 | [diff] [blame] | 133 | method public void addWeakLoadStateListener(kotlin.jvm.functions.Function3<? super androidx.paging.PagedList.LoadType,? super androidx.paging.PagedList.LoadState,? super java.lang.Throwable,kotlin.Unit> listener); |
Chris Craik | 557c882 | 2018-10-25 15:04:03 -0700 | [diff] [blame] | 134 | method public abstract void detach(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 135 | method public T? get(int index); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 136 | method public androidx.paging.PagedList.Config getConfig(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 137 | method public abstract androidx.paging.DataSource<?,T> getDataSource(); |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 138 | method public abstract Object? getLastKey(); |
Chris Craik | 00cf205 | 2018-08-10 14:00:23 -0700 | [diff] [blame] | 139 | method public int getLoadedCount(); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 140 | method public int getPositionOffset(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 141 | method public int getSize(); |
| 142 | method public abstract boolean isContiguous(); |
Chris Craik | 557c882 | 2018-10-25 15:04:03 -0700 | [diff] [blame] | 143 | method public abstract boolean isDetached(); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 144 | method public boolean isImmutable(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 145 | method public void loadAround(int index); |
| 146 | method public void removeWeakCallback(androidx.paging.PagedList.Callback callback); |
Dustin Lam | 7b116f5 | 2019-06-12 13:51:31 -0700 | [diff] [blame] | 147 | method public void removeWeakLoadStateListener(kotlin.jvm.functions.Function3<? super androidx.paging.PagedList.LoadType,? super androidx.paging.PagedList.LoadState,? super java.lang.Throwable,kotlin.Unit> listener); |
Chris Craik | cf72bdc | 2018-10-18 13:32:02 -0700 | [diff] [blame] | 148 | method public void retry(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 149 | method public java.util.List<T> snapshot(); |
| 150 | property public androidx.paging.PagedList.Config config; |
| 151 | property public abstract androidx.paging.DataSource<?,T> dataSource; |
| 152 | property public abstract boolean isContiguous; |
| 153 | property public abstract boolean isDetached; |
| 154 | property public boolean isImmutable; |
| 155 | property public abstract Object? lastKey; |
| 156 | property public int loadedCount; |
| 157 | property public int positionOffset; |
| 158 | property public int size; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 159 | } |
| 160 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 161 | @MainThread public abstract static class PagedList.BoundaryCallback<T> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 162 | ctor public PagedList.BoundaryCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 163 | method public void onItemAtEndLoaded(T? itemAtEnd); |
| 164 | method public void onItemAtFrontLoaded(T? itemAtFront); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 165 | method public void onZeroItemsLoaded(); |
| 166 | } |
| 167 | |
| 168 | public static final class PagedList.Builder<Key, Value> { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 169 | ctor public PagedList.Builder(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config); |
| 170 | ctor public PagedList.Builder(androidx.paging.DataSource<Key,Value> dataSource, int pageSize); |
| 171 | method @Deprecated @WorkerThread public androidx.paging.PagedList<Value> build(); |
| 172 | method public com.google.common.util.concurrent.ListenableFuture<androidx.paging.PagedList<Value>> buildAsync(); |
| 173 | method public androidx.paging.PagedList.Builder<Key,Value> setBoundaryCallback(androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback); |
Dustin Lam | dba215c | 2019-06-21 17:35:26 -0700 | [diff] [blame] | 174 | method public androidx.paging.PagedList.Builder<Key,Value> setCoroutineScope(kotlinx.coroutines.CoroutineScope coroutineScope); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 175 | method public androidx.paging.PagedList.Builder<Key,Value> setFetchExecutor(java.util.concurrent.Executor fetchExecutor); |
| 176 | method public androidx.paging.PagedList.Builder<Key,Value> setInitialKey(Key? initialKey); |
| 177 | method public androidx.paging.PagedList.Builder<Key,Value> setNotifyExecutor(java.util.concurrent.Executor notifyExecutor); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 178 | } |
| 179 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 180 | public abstract static class PagedList.Callback { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 181 | ctor public PagedList.Callback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 182 | method public abstract void onChanged(int position, int count); |
| 183 | method public abstract void onInserted(int position, int count); |
| 184 | method public abstract void onRemoved(int position, int count); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 185 | } |
| 186 | |
Dustin Lam | b2de3cc | 2019-06-12 09:47:19 -0700 | [diff] [blame] | 187 | public static final class PagedList.Config { |
Chris Craik | e8ca38c | 2018-05-22 18:08:16 -0700 | [diff] [blame] | 188 | field public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 189 | field public final boolean enablePlaceholders; |
| 190 | field public final int initialLoadSizeHint; |
Chris Craik | e8ca38c | 2018-05-22 18:08:16 -0700 | [diff] [blame] | 191 | field public final int maxSize; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 192 | field public final int pageSize; |
| 193 | field public final int prefetchDistance; |
| 194 | } |
| 195 | |
| 196 | public static final class PagedList.Config.Builder { |
| 197 | ctor public PagedList.Config.Builder(); |
| 198 | method public androidx.paging.PagedList.Config build(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 199 | method public androidx.paging.PagedList.Config.Builder setEnablePlaceholders(boolean enablePlaceholders); |
| 200 | method public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1) int initialLoadSizeHint); |
| 201 | method public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2) int maxSize); |
| 202 | method public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1) int pageSize); |
| 203 | method public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0) int prefetchDistance); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 204 | } |
| 205 | |
Jeff Gaston | 5d65a6a | 2019-01-23 13:44:15 -0500 | [diff] [blame] | 206 | public enum PagedList.LoadState { |
Chris Craik | cf72bdc | 2018-10-18 13:32:02 -0700 | [diff] [blame] | 207 | enum_constant public static final androidx.paging.PagedList.LoadState DONE; |
| 208 | enum_constant public static final androidx.paging.PagedList.LoadState ERROR; |
| 209 | enum_constant public static final androidx.paging.PagedList.LoadState IDLE; |
| 210 | enum_constant public static final androidx.paging.PagedList.LoadState LOADING; |
| 211 | enum_constant public static final androidx.paging.PagedList.LoadState RETRYABLE_ERROR; |
| 212 | } |
| 213 | |
Jeff Gaston | 5d65a6a | 2019-01-23 13:44:15 -0500 | [diff] [blame] | 214 | public enum PagedList.LoadType { |
Chris Craik | cf72bdc | 2018-10-18 13:32:02 -0700 | [diff] [blame] | 215 | enum_constant public static final androidx.paging.PagedList.LoadType END; |
| 216 | enum_constant public static final androidx.paging.PagedList.LoadType REFRESH; |
| 217 | enum_constant public static final androidx.paging.PagedList.LoadType START; |
| 218 | } |
| 219 | |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 220 | public final class PagedListConfigKt { |
| 221 | ctor public PagedListConfigKt(); |
| 222 | method public static androidx.paging.PagedList.Config Config(int pageSize, int prefetchDistance = pageSize, boolean enablePlaceholders = true, int initialLoadSizeHint = pageSize * androidx.paging.PagedList.Config.Builder.DEFAULT_INITIAL_PAGE_MULTIPLIER, int maxSize = 2147483647); |
| 223 | } |
| 224 | |
Dustin Lam | 26ca1a7 | 2019-05-28 17:42:51 -0700 | [diff] [blame] | 225 | public final class PagedListKt { |
| 226 | ctor public PagedListKt(); |
| 227 | method public static <Key, Value> androidx.paging.PagedList<Value> PagedList(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config, java.util.concurrent.Executor notifyExecutor, java.util.concurrent.Executor fetchExecutor, androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback = null, Key? initialKey = null); |
| 228 | } |
| 229 | |
Dustin Lam | ff2f979 | 2019-06-14 19:38:01 -0700 | [diff] [blame] | 230 | public abstract class PagedSource<Key, Value> { |
| 231 | ctor public PagedSource(); |
| 232 | method public abstract boolean getInvalid(); |
| 233 | method public abstract androidx.paging.PagedSource.KeyProvider<Key,Value> getKeyProvider(); |
| 234 | method public abstract void invalidate(); |
| 235 | method public abstract boolean isRetryableError(Throwable error); |
Dustin Lam | dba215c | 2019-06-21 17:35:26 -0700 | [diff] [blame] | 236 | method public abstract suspend Object load(androidx.paging.PagedSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagedSource.LoadResult<Key,Value>> p); |
Dustin Lam | ff2f979 | 2019-06-14 19:38:01 -0700 | [diff] [blame] | 237 | property public abstract boolean invalid; |
| 238 | property public abstract androidx.paging.PagedSource.KeyProvider<Key,Value> keyProvider; |
| 239 | field public static final int COUNT_UNDEFINED = -1; // 0xffffffff |
| 240 | field public static final androidx.paging.PagedSource.Companion! Companion; |
| 241 | } |
| 242 | |
| 243 | public static final class PagedSource.Companion { |
| 244 | } |
| 245 | |
| 246 | public abstract static sealed class PagedSource.KeyProvider<Key, Value> { |
| 247 | } |
| 248 | |
| 249 | public abstract static class PagedSource.KeyProvider.ItemKey<Key, Value> extends androidx.paging.PagedSource.KeyProvider<Key,Value> { |
| 250 | ctor public PagedSource.KeyProvider.ItemKey(); |
| 251 | method public abstract Key getKey(Value item); |
| 252 | } |
| 253 | |
| 254 | public static final class PagedSource.KeyProvider.PageKey<Key, Value> extends androidx.paging.PagedSource.KeyProvider<Key,Value> { |
| 255 | ctor public PagedSource.KeyProvider.PageKey(); |
| 256 | } |
| 257 | |
| 258 | public static final class PagedSource.KeyProvider.Positional<Value> extends androidx.paging.PagedSource.KeyProvider<java.lang.Integer,Value> { |
| 259 | ctor public PagedSource.KeyProvider.Positional(); |
| 260 | } |
| 261 | |
| 262 | public static final class PagedSource.LoadParams<Key> { |
| 263 | ctor public PagedSource.LoadParams(androidx.paging.PagedSource.LoadType loadType, Key? key, int loadSize, boolean placeholdersEnabled, int pageSize); |
| 264 | method public androidx.paging.PagedSource.LoadType component1(); |
| 265 | method public Key? component2(); |
| 266 | method public int component3(); |
| 267 | method public boolean component4(); |
| 268 | method public int component5(); |
| 269 | method public androidx.paging.PagedSource.LoadParams<Key> copy(androidx.paging.PagedSource.LoadType loadType, Key? key, int loadSize, boolean placeholdersEnabled, int pageSize); |
| 270 | method public Key? getKey(); |
| 271 | method public int getLoadSize(); |
| 272 | method public androidx.paging.PagedSource.LoadType getLoadType(); |
| 273 | method public int getPageSize(); |
| 274 | method public boolean getPlaceholdersEnabled(); |
| 275 | } |
| 276 | |
| 277 | public static final class PagedSource.LoadResult<Key, Value> { |
| 278 | ctor public PagedSource.LoadResult(int itemsBefore, int itemsAfter, Key? nextKey, Key? prevKey, java.util.List<? extends Value> data, int offset, boolean counted); |
| 279 | method public int component1(); |
| 280 | method public int component2(); |
| 281 | method public Key? component3(); |
| 282 | method public Key? component4(); |
| 283 | method public java.util.List<Value> component5(); |
| 284 | method public int component6(); |
| 285 | method public boolean component7(); |
| 286 | method public androidx.paging.PagedSource.LoadResult<Key,Value> copy(int itemsBefore, int itemsAfter, Key? nextKey, Key? prevKey, java.util.List<? extends Value> data, int offset, boolean counted); |
| 287 | method public boolean getCounted(); |
| 288 | method public java.util.List<Value> getData(); |
| 289 | method public int getItemsAfter(); |
| 290 | method public int getItemsBefore(); |
| 291 | method public Key? getNextKey(); |
| 292 | method public int getOffset(); |
| 293 | method public Key? getPrevKey(); |
| 294 | } |
| 295 | |
| 296 | public enum PagedSource.LoadType { |
| 297 | enum_constant public static final androidx.paging.PagedSource.LoadType END; |
| 298 | enum_constant public static final androidx.paging.PagedSource.LoadType INITIAL; |
| 299 | enum_constant public static final androidx.paging.PagedSource.LoadType START; |
| 300 | } |
| 301 | |
Dustin Lam | a7fecfa | 2019-06-20 18:39:13 -0700 | [diff] [blame] | 302 | public abstract class PositionalDataSource<T> extends androidx.paging.DataSource<java.lang.Integer,T> { |
Chris Craik | 557c882 | 2018-10-25 15:04:03 -0700 | [diff] [blame] | 303 | ctor public PositionalDataSource(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 304 | method public static final int computeInitialLoadPosition(androidx.paging.PositionalDataSource.LoadInitialParams params, int totalCount); |
| 305 | method public static final int computeInitialLoadSize(androidx.paging.PositionalDataSource.LoadInitialParams params, int initialLoadPosition, int totalCount); |
Dustin Lam | d847ca6 | 2019-06-24 14:53:17 -0700 | [diff] [blame^] | 306 | method public final suspend Object load$lintWithKotlin(androidx.paging.DataSource.Params<java.lang.Integer> params, kotlin.coroutines.Continuation<? super androidx.paging.DataSource.BaseResult<T>> p); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 307 | method @WorkerThread public abstract void loadInitial(androidx.paging.PositionalDataSource.LoadInitialParams params, androidx.paging.PositionalDataSource.LoadInitialCallback<T> callback); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 308 | method @WorkerThread public abstract void loadRange(androidx.paging.PositionalDataSource.LoadRangeParams params, androidx.paging.PositionalDataSource.LoadRangeCallback<T> callback); |
| 309 | method public final <V> androidx.paging.PositionalDataSource<V> map(androidx.arch.core.util.Function<T,V> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 310 | method public final <V> androidx.paging.PositionalDataSource<V> map(kotlin.jvm.functions.Function1<? super T,? extends V> function); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 311 | method public final <V> androidx.paging.PositionalDataSource<V> mapByPage(androidx.arch.core.util.Function<java.util.List<T>,java.util.List<V>> function); |
Dustin Lam | c7011f2 | 2019-06-18 16:02:48 -0700 | [diff] [blame] | 312 | method public final <V> androidx.paging.PositionalDataSource<V> mapByPage(kotlin.jvm.functions.Function1<? super java.util.List<? extends T>,? extends java.util.List<? extends V>> function); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 313 | } |
| 314 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 315 | public abstract static class PositionalDataSource.LoadInitialCallback<T> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 316 | ctor public PositionalDataSource.LoadInitialCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 317 | method public void onError(Throwable error); |
| 318 | method public abstract void onResult(java.util.List<? extends T> data, int position, int totalCount); |
| 319 | method public abstract void onResult(java.util.List<? extends T> data, int position); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 320 | } |
| 321 | |
Dustin Lam | a7fecfa | 2019-06-20 18:39:13 -0700 | [diff] [blame] | 322 | public static class PositionalDataSource.LoadInitialParams { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 323 | ctor public PositionalDataSource.LoadInitialParams(int requestedStartPosition, int requestedLoadSize, int pageSize, boolean placeholdersEnabled); |
Dustin Lam | a7fecfa | 2019-06-20 18:39:13 -0700 | [diff] [blame] | 324 | field public final int pageSize; |
| 325 | field public final boolean placeholdersEnabled; |
| 326 | field public final int requestedLoadSize; |
| 327 | field public final int requestedStartPosition; |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 328 | } |
| 329 | |
Jeff Gaston | c21caf9 | 2018-10-16 13:24:41 -0400 | [diff] [blame] | 330 | public abstract static class PositionalDataSource.LoadRangeCallback<T> { |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 331 | ctor public PositionalDataSource.LoadRangeCallback(); |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 332 | method public void onError(Throwable error); |
| 333 | method public abstract void onResult(java.util.List<? extends T> data); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 334 | } |
| 335 | |
Dustin Lam | a7fecfa | 2019-06-20 18:39:13 -0700 | [diff] [blame] | 336 | public static class PositionalDataSource.LoadRangeParams { |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 337 | ctor public PositionalDataSource.LoadRangeParams(int startPosition, int loadSize); |
Dustin Lam | a7fecfa | 2019-06-20 18:39:13 -0700 | [diff] [blame] | 338 | field public final int loadSize; |
| 339 | field public final int startPosition; |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 340 | } |
| 341 | |
| 342 | } |
| 343 | |
| 344 | package androidx.paging.futures { |
| 345 | |
Dustin Lam | 77e18d1 | 2019-06-13 10:53:57 -0700 | [diff] [blame] | 346 | public final class DirectExecutorKt { |
| 347 | ctor public DirectExecutorKt(); |
| 348 | } |
| 349 | |
Dustin Lam | b6bab3f | 2019-05-20 08:05:34 -0700 | [diff] [blame] | 350 | public final class Futures { |
| 351 | ctor public Futures(); |
Chris Craik | 7cb6041 | 2018-04-04 13:02:50 -0700 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | } |
| 355 | |