[go: nahoru, domu]

blob: 26686b05860a900b6ba6251674c9f9603ca6c5b6 [file] [log] [blame]
Jeff Gaston5d65a6a2019-01-23 13:44:15 -05001// Signature format: 3.0
Chris Craik7cb60412018-04-04 13:02:50 -07002package androidx.paging {
3
Dustin Lamc019a722020-01-10 13:37:18 -08004 public final class CachedPagingDataKt {
Chris Craik1933a6a2020-03-11 12:11:30 -07005 method @CheckResult public static <T> kotlinx.coroutines.flow.Flow<androidx.paging.PagingData<T>> cachedIn(kotlinx.coroutines.flow.Flow<androidx.paging.PagingData<T>>, kotlinx.coroutines.CoroutineScope scope);
Yigit Boyarc77bc772019-12-20 13:14:12 -08006 }
7
Dustin Lambfb40382020-01-14 15:17:18 -08008 public final class CancelableChannelFlowKt {
9 }
10
Chris Craik7cb60412018-04-04 13:02:50 -070011 public abstract class DataSource<Key, Value> {
Dustin Lamb6bab3f2019-05-20 08:05:34 -070012 method @AnyThread public void addInvalidatedCallback(androidx.paging.DataSource.InvalidatedCallback onInvalidatedCallback);
Dustin Lam7b116f52019-06-12 13:51:31 -070013 method @AnyThread public final void addInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
Jeff Gastonc21caf92018-10-16 13:24:41 -040014 method @AnyThread public void invalidate();
15 method @WorkerThread public boolean isInvalid();
Dustin Lamb6bab3f2019-05-20 08:05:34 -070016 method public <ToValue> androidx.paging.DataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function);
Dustin Lamc7011f22019-06-18 16:02:48 -070017 method public <ToValue> androidx.paging.DataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function);
Dustin Lamb6bab3f2019-05-20 08:05:34 -070018 method public <ToValue> androidx.paging.DataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function);
Dustin Lamc7011f22019-06-18 16:02:48 -070019 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 Lamb6bab3f2019-05-20 08:05:34 -070020 method @AnyThread public void removeInvalidatedCallback(androidx.paging.DataSource.InvalidatedCallback onInvalidatedCallback);
Dustin Lam7b116f52019-06-12 13:51:31 -070021 method @AnyThread public final void removeInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
Dustin Lamb6bab3f2019-05-20 08:05:34 -070022 property @WorkerThread public boolean isInvalid;
23 }
24
Jeff Gastonc21caf92018-10-16 13:24:41 -040025 public abstract static class DataSource.Factory<Key, Value> {
Chris Craik7cb60412018-04-04 13:02:50 -070026 ctor public DataSource.Factory();
Dustin Lamcaee0ab2020-01-10 15:59:37 -080027 method public final kotlin.jvm.functions.Function0<androidx.paging.PagingSource<Key,Value>> asPagingSourceFactory(kotlinx.coroutines.CoroutineDispatcher fetchDispatcher = Dispatchers.IO);
28 method public final kotlin.jvm.functions.Function0<androidx.paging.PagingSource<Key,Value>> asPagingSourceFactory();
Dustin Lamb6bab3f2019-05-20 08:05:34 -070029 method public abstract androidx.paging.DataSource<Key,Value> create();
30 method public <ToValue> androidx.paging.DataSource.Factory<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function);
Dustin Lamc7011f22019-06-18 16:02:48 -070031 method public <ToValue> androidx.paging.DataSource.Factory<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function);
Dustin Lamb6bab3f2019-05-20 08:05:34 -070032 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 Lamc7011f22019-06-18 16:02:48 -070033 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 Craik7cb60412018-04-04 13:02:50 -070034 }
35
Jeff Gastonc21caf92018-10-16 13:24:41 -040036 public static interface DataSource.InvalidatedCallback {
37 method @AnyThread public void onInvalidated();
Chris Craik7cb60412018-04-04 13:02:50 -070038 }
39
Dustin Lamcee0e1e2020-02-04 15:12:18 -080040 @Deprecated public abstract class ItemKeyedDataSource<Key, Value> extends androidx.paging.DataSource<Key,Value> {
41 ctor @Deprecated public ItemKeyedDataSource();
42 method @Deprecated public abstract Key getKey(Value item);
43 method @Deprecated public abstract void loadAfter(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadCallback<Value> callback);
44 method @Deprecated public abstract void loadBefore(androidx.paging.ItemKeyedDataSource.LoadParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadCallback<Value> callback);
45 method @Deprecated public abstract void loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams<Key> params, androidx.paging.ItemKeyedDataSource.LoadInitialCallback<Value> callback);
46 method @Deprecated public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function);
47 method @Deprecated public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function);
48 method @Deprecated public final <ToValue> androidx.paging.ItemKeyedDataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function);
49 method @Deprecated 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 Craik7cb60412018-04-04 13:02:50 -070050 }
51
Dustin Lamcee0e1e2020-02-04 15:12:18 -080052 @Deprecated public abstract static class ItemKeyedDataSource.LoadCallback<Value> {
53 ctor @Deprecated public ItemKeyedDataSource.LoadCallback();
54 method @Deprecated public abstract void onResult(java.util.List<? extends Value> data);
Chris Craik7cb60412018-04-04 13:02:50 -070055 }
56
Dustin Lamcee0e1e2020-02-04 15:12:18 -080057 @Deprecated public abstract static class ItemKeyedDataSource.LoadInitialCallback<Value> extends androidx.paging.ItemKeyedDataSource.LoadCallback<Value> {
58 ctor @Deprecated public ItemKeyedDataSource.LoadInitialCallback();
59 method @Deprecated public abstract void onResult(java.util.List<? extends Value> data, int position, int totalCount);
Chris Craik7cb60412018-04-04 13:02:50 -070060 }
61
Dustin Lamcee0e1e2020-02-04 15:12:18 -080062 @Deprecated public static class ItemKeyedDataSource.LoadInitialParams<Key> {
63 ctor @Deprecated public ItemKeyedDataSource.LoadInitialParams(Key? requestedInitialKey, int requestedLoadSize, boolean placeholdersEnabled);
64 field @Deprecated public final boolean placeholdersEnabled;
65 field @Deprecated public final Key? requestedInitialKey;
66 field @Deprecated public final int requestedLoadSize;
Chris Craik7cb60412018-04-04 13:02:50 -070067 }
68
Dustin Lamcee0e1e2020-02-04 15:12:18 -080069 @Deprecated public static class ItemKeyedDataSource.LoadParams<Key> {
70 ctor @Deprecated public ItemKeyedDataSource.LoadParams(Key key, int requestedLoadSize);
71 field @Deprecated public final Key key;
72 field @Deprecated public final int requestedLoadSize;
Chris Craik7cb60412018-04-04 13:02:50 -070073 }
74
Dustin Lamc6431e42019-08-28 18:40:11 -070075 public abstract sealed class LoadState {
Dustin Lamcc1dd3d2020-04-13 23:56:45 -070076 method public final boolean getEndOfPaginationReached();
Dustin Lamc6431e42019-08-28 18:40:11 -070077 }
78
79 public static final class LoadState.Error extends androidx.paging.LoadState {
Chris Craikbda30df2019-09-06 15:14:28 -070080 ctor public LoadState.Error(Throwable error);
Dustin Lamc6431e42019-08-28 18:40:11 -070081 method public Throwable component1();
Chris Craikbda30df2019-09-06 15:14:28 -070082 method public androidx.paging.LoadState.Error copy(Throwable error);
Dustin Lamc6431e42019-08-28 18:40:11 -070083 method public Throwable getError();
Dustin Lamc6431e42019-08-28 18:40:11 -070084 }
85
Dustin Lamc6431e42019-08-28 18:40:11 -070086 public static final class LoadState.Loading extends androidx.paging.LoadState {
87 field public static final androidx.paging.LoadState.Loading! INSTANCE;
88 }
89
Dustin Lamcc1dd3d2020-04-13 23:56:45 -070090 public static final class LoadState.NotLoading extends androidx.paging.LoadState {
91 ctor public LoadState.NotLoading(boolean endOfPaginationReached);
92 }
93
Dustin Lamc6431e42019-08-28 18:40:11 -070094 public enum LoadType {
Dustin Lam9c713672020-04-21 13:28:58 -070095 enum_constant public static final androidx.paging.LoadType APPEND;
96 enum_constant public static final androidx.paging.LoadType PREPEND;
Dustin Lamc6431e42019-08-28 18:40:11 -070097 enum_constant public static final androidx.paging.LoadType REFRESH;
Dustin Lamc6431e42019-08-28 18:40:11 -070098 }
99
Chris Craik29bc4692019-12-05 09:44:57 -0800100 public final class PageEventKt {
Chris Craik29bc4692019-12-05 09:44:57 -0800101 }
102
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800103 @Deprecated public abstract class PageKeyedDataSource<Key, Value> extends androidx.paging.DataSource<Key,Value> {
104 ctor @Deprecated public PageKeyedDataSource();
105 method @Deprecated public abstract void loadAfter(androidx.paging.PageKeyedDataSource.LoadParams<Key> params, androidx.paging.PageKeyedDataSource.LoadCallback<Key,Value> callback);
106 method @Deprecated public abstract void loadBefore(androidx.paging.PageKeyedDataSource.LoadParams<Key> params, androidx.paging.PageKeyedDataSource.LoadCallback<Key,Value> callback);
107 method @Deprecated public abstract void loadInitial(androidx.paging.PageKeyedDataSource.LoadInitialParams<Key> params, androidx.paging.PageKeyedDataSource.LoadInitialCallback<Key,Value> callback);
108 method @Deprecated public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> map(androidx.arch.core.util.Function<Value,ToValue> function);
109 method @Deprecated public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> map(kotlin.jvm.functions.Function1<? super Value,? extends ToValue> function);
110 method @Deprecated public final <ToValue> androidx.paging.PageKeyedDataSource<Key,ToValue> mapByPage(androidx.arch.core.util.Function<java.util.List<Value>,java.util.List<ToValue>> function);
111 method @Deprecated 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 Craik7cb60412018-04-04 13:02:50 -0700112 }
113
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800114 @Deprecated public abstract static class PageKeyedDataSource.LoadCallback<Key, Value> {
115 ctor @Deprecated public PageKeyedDataSource.LoadCallback();
116 method @Deprecated public abstract void onResult(java.util.List<? extends Value> data, Key? adjacentPageKey);
Chris Craik7cb60412018-04-04 13:02:50 -0700117 }
118
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800119 @Deprecated public abstract static class PageKeyedDataSource.LoadInitialCallback<Key, Value> {
120 ctor @Deprecated public PageKeyedDataSource.LoadInitialCallback();
121 method @Deprecated public abstract void onResult(java.util.List<? extends Value> data, int position, int totalCount, Key? previousPageKey, Key? nextPageKey);
122 method @Deprecated public abstract void onResult(java.util.List<? extends Value> data, Key? previousPageKey, Key? nextPageKey);
Chris Craik7cb60412018-04-04 13:02:50 -0700123 }
124
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800125 @Deprecated public static class PageKeyedDataSource.LoadInitialParams<Key> {
126 ctor @Deprecated public PageKeyedDataSource.LoadInitialParams(int requestedLoadSize, boolean placeholdersEnabled);
127 field @Deprecated public final boolean placeholdersEnabled;
128 field @Deprecated public final int requestedLoadSize;
Chris Craik7cb60412018-04-04 13:02:50 -0700129 }
130
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800131 @Deprecated public static class PageKeyedDataSource.LoadParams<Key> {
132 ctor @Deprecated public PageKeyedDataSource.LoadParams(Key key, int requestedLoadSize);
133 field @Deprecated public final Key key;
134 field @Deprecated public final int requestedLoadSize;
Chris Craik7cb60412018-04-04 13:02:50 -0700135 }
136
Dustin Lam74ee0172020-02-10 17:17:19 -0800137 @Deprecated public abstract class PagedList<T> extends java.util.AbstractList<T> {
Chris Craikc5178fb2019-08-30 09:58:53 -0700138 method @Deprecated public final void addWeakCallback(java.util.List<? extends T>? previousSnapshot, androidx.paging.PagedList.Callback callback);
Dustin Lam74ee0172020-02-10 17:17:19 -0800139 method @Deprecated public final void addWeakCallback(androidx.paging.PagedList.Callback callback);
140 method @Deprecated public final void addWeakLoadStateListener(kotlin.jvm.functions.Function2<? super androidx.paging.LoadType,? super androidx.paging.LoadState,kotlin.Unit> listener);
141 method @Deprecated public abstract void detach();
142 method @Deprecated public T? get(int index);
143 method @Deprecated public final androidx.paging.PagedList.Config getConfig();
Dustin Lam5cab6ee2019-07-17 09:49:04 -0700144 method @Deprecated public final androidx.paging.DataSource<?,T> getDataSource();
Dustin Lam74ee0172020-02-10 17:17:19 -0800145 method @Deprecated public abstract Object? getLastKey();
146 method @Deprecated public final int getLoadedCount();
147 method @Deprecated public final int getPositionOffset();
148 method @Deprecated public int getSize();
149 method @Deprecated public abstract boolean isDetached();
150 method @Deprecated public boolean isImmutable();
151 method @Deprecated public final void loadAround(int index);
152 method @Deprecated public final void removeWeakCallback(androidx.paging.PagedList.Callback callback);
153 method @Deprecated public final void removeWeakLoadStateListener(kotlin.jvm.functions.Function2<? super androidx.paging.LoadType,? super androidx.paging.LoadState,kotlin.Unit> listener);
154 method @Deprecated public void retry();
155 method @Deprecated public final java.util.List<T> snapshot();
Dustin Lam5cab6ee2019-07-17 09:49:04 -0700156 property @Deprecated public final androidx.paging.DataSource<?,T> dataSource;
Dustin Lamb6bab3f2019-05-20 08:05:34 -0700157 property public abstract boolean isDetached;
158 property public boolean isImmutable;
159 property public abstract Object? lastKey;
Chris Craikc5178fb2019-08-30 09:58:53 -0700160 property public final int loadedCount;
161 property public final int positionOffset;
Dustin Lamb6bab3f2019-05-20 08:05:34 -0700162 property public int size;
Chris Craik7cb60412018-04-04 13:02:50 -0700163 }
164
Dustin Lam74ee0172020-02-10 17:17:19 -0800165 @Deprecated @MainThread public abstract static class PagedList.BoundaryCallback<T> {
166 ctor @Deprecated public PagedList.BoundaryCallback();
167 method @Deprecated public void onItemAtEndLoaded(T itemAtEnd);
168 method @Deprecated public void onItemAtFrontLoaded(T itemAtFront);
169 method @Deprecated public void onZeroItemsLoaded();
Chris Craik7cb60412018-04-04 13:02:50 -0700170 }
171
Dustin Lam74ee0172020-02-10 17:17:19 -0800172 @Deprecated public static final class PagedList.Builder<Key, Value> {
Dustin Lamaa0515c2019-07-02 19:35:29 -0700173 ctor @Deprecated public PagedList.Builder(androidx.paging.DataSource<Key,Value> dataSource, androidx.paging.PagedList.Config config);
174 ctor @Deprecated public PagedList.Builder(androidx.paging.DataSource<Key,Value> dataSource, int pageSize);
Dustin Lam74ee0172020-02-10 17:17:19 -0800175 ctor @Deprecated public PagedList.Builder(androidx.paging.PagingSource<Key,Value> pagingSource, androidx.paging.PagingSource.LoadResult.Page<Key,Value> initialPage, androidx.paging.PagedList.Config config);
176 ctor @Deprecated public PagedList.Builder(androidx.paging.PagingSource<Key,Value> pagingSource, androidx.paging.PagingSource.LoadResult.Page<Key,Value> initialPage, int pageSize);
177 method @Deprecated public androidx.paging.PagedList<Value> build();
178 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setBoundaryCallback(androidx.paging.PagedList.BoundaryCallback<Value>? boundaryCallback);
179 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setCoroutineScope(kotlinx.coroutines.CoroutineScope coroutineScope);
180 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setFetchDispatcher(kotlinx.coroutines.CoroutineDispatcher fetchDispatcher);
Dustin Lamdc14fd02019-08-01 19:34:18 -0700181 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setFetchExecutor(java.util.concurrent.Executor fetchExecutor);
Dustin Lam74ee0172020-02-10 17:17:19 -0800182 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setInitialKey(Key? initialKey);
183 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setNotifyDispatcher(kotlinx.coroutines.CoroutineDispatcher notifyDispatcher);
Dustin Lamdc14fd02019-08-01 19:34:18 -0700184 method @Deprecated public androidx.paging.PagedList.Builder<Key,Value> setNotifyExecutor(java.util.concurrent.Executor notifyExecutor);
Chris Craik7cb60412018-04-04 13:02:50 -0700185 }
186
Dustin Lam74ee0172020-02-10 17:17:19 -0800187 @Deprecated public abstract static class PagedList.Callback {
188 ctor @Deprecated public PagedList.Callback();
189 method @Deprecated public abstract void onChanged(int position, int count);
190 method @Deprecated public abstract void onInserted(int position, int count);
191 method @Deprecated public abstract void onRemoved(int position, int count);
Chris Craik7cb60412018-04-04 13:02:50 -0700192 }
193
Dustin Lam74ee0172020-02-10 17:17:19 -0800194 @Deprecated public static final class PagedList.Config {
195 field @Deprecated public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff
196 field @Deprecated public final boolean enablePlaceholders;
197 field @Deprecated public final int initialLoadSizeHint;
198 field @Deprecated public final int maxSize;
199 field @Deprecated public final int pageSize;
200 field @Deprecated public final int prefetchDistance;
Chris Craik7cb60412018-04-04 13:02:50 -0700201 }
202
Dustin Lam74ee0172020-02-10 17:17:19 -0800203 @Deprecated public static final class PagedList.Config.Builder {
204 ctor @Deprecated public PagedList.Config.Builder();
205 method @Deprecated public androidx.paging.PagedList.Config build();
206 method @Deprecated public androidx.paging.PagedList.Config.Builder setEnablePlaceholders(boolean enablePlaceholders);
207 method @Deprecated public androidx.paging.PagedList.Config.Builder setInitialLoadSizeHint(@IntRange(from=1) int initialLoadSizeHint);
208 method @Deprecated public androidx.paging.PagedList.Config.Builder setMaxSize(@IntRange(from=2) int maxSize);
209 method @Deprecated public androidx.paging.PagedList.Config.Builder setPageSize(@IntRange(from=1) int pageSize);
210 method @Deprecated public androidx.paging.PagedList.Config.Builder setPrefetchDistance(@IntRange(from=0) int prefetchDistance);
Chris Craik7cb60412018-04-04 13:02:50 -0700211 }
212
Dustin Lamb6bab3f2019-05-20 08:05:34 -0700213 public final class PagedListConfigKt {
Dustin Lamb6bab3f2019-05-20 08:05:34 -0700214 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);
215 }
216
Dustin Lam26ca1a72019-05-28 17:42:51 -0700217 public final class PagedListKt {
Dustin Lam5cab6ee2019-07-17 09:49:04 -0700218 method @Deprecated 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);
Dustin Lam26ca1a72019-05-28 17:42:51 -0700219 }
220
Dustin Lam84cc4902020-04-10 14:50:35 -0700221 public final class Pager<Key, Value> {
222 ctor public Pager(androidx.paging.PagingConfig config, Key? initialKey, androidx.paging.RemoteMediator<Key,Value>? remoteMediator, kotlin.jvm.functions.Function0<? extends androidx.paging.PagingSource<Key,Value>> pagingSourceFactory);
223 ctor public Pager(androidx.paging.PagingConfig config, Key? initialKey, kotlin.jvm.functions.Function0<? extends androidx.paging.PagingSource<Key,Value>> pagingSourceFactory);
224 ctor public Pager(androidx.paging.PagingConfig config, kotlin.jvm.functions.Function0<? extends androidx.paging.PagingSource<Key,Value>> pagingSourceFactory);
225 method public kotlinx.coroutines.flow.Flow<androidx.paging.PagingData<Value>> getFlow();
226 property public final kotlinx.coroutines.flow.Flow<androidx.paging.PagingData<Value>> flow;
227 }
228
Chris Craik251f4132020-01-03 09:45:19 -0800229 public final class PagingConfig {
Dustin Lamb9ea3b62020-04-09 22:08:13 -0700230 ctor public PagingConfig(int pageSize, @IntRange(from=null) int prefetchDistance, boolean enablePlaceholders, @IntRange(from=null) int initialLoadSize, @IntRange(from=null) int maxSize, int jumpThreshold);
Chris Craik251f4132020-01-03 09:45:19 -0800231 field public static final androidx.paging.PagingConfig.Companion! Companion;
232 field public static final int MAX_SIZE_UNBOUNDED = 2147483647; // 0x7fffffff
233 field public final boolean enablePlaceholders;
234 field public final int initialLoadSize;
Dustin Lamd9ccaf32020-03-30 19:06:01 -0700235 field public final int jumpThreshold;
Chris Craik251f4132020-01-03 09:45:19 -0800236 field public final int maxSize;
237 field public final int pageSize;
238 field public final int prefetchDistance;
239 }
240
Chris Craik251f4132020-01-03 09:45:19 -0800241 public static final class PagingConfig.Companion {
242 }
243
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800244 public final class PagingData<T> {
Dustin Lamb82a27f2020-02-04 17:09:34 -0800245 method public static <T> androidx.paging.PagingData<T> empty();
Chris Craik1933a6a2020-03-11 12:11:30 -0700246 method @CheckResult public androidx.paging.PagingData<T> filter(kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> predicate);
247 method @CheckResult public <R> androidx.paging.PagingData<R> flatMap(kotlin.jvm.functions.Function1<? super T,? extends java.lang.Iterable<? extends R>> transform);
Chris Craik5b5ca9c2020-03-13 13:39:12 -0700248 method @CheckResult public androidx.paging.PagingData<T> insertFooterItem(T item);
249 method @CheckResult public androidx.paging.PagingData<T> insertHeaderItem(T item);
Chris Craik1933a6a2020-03-11 12:11:30 -0700250 method @CheckResult public static <T extends R, R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T> pagingData, kotlin.jvm.functions.Function2<? super T,? super T,? extends R> generator);
251 method @CheckResult public <R> androidx.paging.PagingData<R> map(kotlin.jvm.functions.Function1<? super T,? extends R> transform);
Dustin Lamb82a27f2020-02-04 17:09:34 -0800252 field public static final androidx.paging.PagingData.Companion! Companion;
253 }
254
255 public static final class PagingData.Companion {
256 method public <T> androidx.paging.PagingData<T> empty();
Chris Craik1933a6a2020-03-11 12:11:30 -0700257 method @CheckResult public <T extends R, R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T> pagingData, kotlin.jvm.functions.Function2<? super T,? super T,? extends R> generator);
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800258 }
259
Chris Craik76219092020-03-09 11:30:01 -0700260 public final class PagingDataKt {
Chris Craik1933a6a2020-03-11 12:11:30 -0700261 method @CheckResult public static <T extends R, R> androidx.paging.PagingData<R> insertSeparators(androidx.paging.PagingData<T>, kotlin.jvm.functions.Function2<? super T,? super T,? extends R> generator);
Chris Craik76219092020-03-09 11:30:01 -0700262 }
263
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800264 public abstract class PagingSource<Key, Value> {
265 ctor public PagingSource();
266 method public final boolean getInvalid();
Dustin Lam537c9682020-03-31 21:43:45 -0700267 method public boolean getJumpingSupported();
Dustin Lamb0346022020-01-17 15:08:13 -0800268 method public Key? getRefreshKey(androidx.paging.PagingState<Key,Value> state);
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800269 method public void invalidate();
270 method public abstract suspend Object load(androidx.paging.PagingSource.LoadParams<Key> params, kotlin.coroutines.Continuation<? super androidx.paging.PagingSource.LoadResult<Key,Value>> p);
271 method public final void registerInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
272 method public final void unregisterInvalidatedCallback(kotlin.jvm.functions.Function0<kotlin.Unit> onInvalidatedCallback);
273 property public final boolean invalid;
Dustin Lam537c9682020-03-31 21:43:45 -0700274 property public boolean jumpingSupported;
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800275 }
276
Yigit Boyarc44fdb22020-04-24 19:55:10 -0700277 public abstract static sealed class PagingSource.LoadParams<Key> {
278 method public abstract Key? getKey();
279 method public final int getLoadSize();
280 method public final int getPageSize();
281 method public final boolean getPlaceholdersEnabled();
282 property public abstract Key? key;
283 }
284
285 public static final class PagingSource.LoadParams.Append<Key> extends androidx.paging.PagingSource.LoadParams<Key> {
286 ctor public PagingSource.LoadParams.Append(Key key, int loadSize, boolean placeholdersEnabled, int pageSize);
287 method public Key getKey();
288 }
289
290 public static final class PagingSource.LoadParams.Prepend<Key> extends androidx.paging.PagingSource.LoadParams<Key> {
291 ctor public PagingSource.LoadParams.Prepend(Key key, int loadSize, boolean placeholdersEnabled, int pageSize);
292 method public Key getKey();
293 }
294
295 public static final class PagingSource.LoadParams.Refresh<Key> extends androidx.paging.PagingSource.LoadParams<Key> {
296 ctor public PagingSource.LoadParams.Refresh(Key? key, int loadSize, boolean placeholdersEnabled, int pageSize);
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800297 method public Key? getKey();
Dustin Lam4b8e0d02020-01-09 15:55:17 -0800298 }
299
300 public abstract static sealed class PagingSource.LoadResult<Key, Value> {
301 }
302
303 public static final class PagingSource.LoadResult.Error<Key, Value> extends androidx.paging.PagingSource.LoadResult<Key,Value> {
304 ctor public PagingSource.LoadResult.Error(Throwable throwable);
305 method public Throwable component1();
306 method public androidx.paging.PagingSource.LoadResult.Error<Key,Value> copy(Throwable throwable);
307 method public Throwable getThrowable();
308 }
309
310 public static final class PagingSource.LoadResult.Page<Key, Value> extends androidx.paging.PagingSource.LoadResult<Key,Value> {
311 ctor public PagingSource.LoadResult.Page(java.util.List<? extends Value> data, Key? prevKey, Key? nextKey, @IntRange(from=null) int itemsBefore, @IntRange(from=null) int itemsAfter);
312 method public java.util.List<Value> component1();
313 method public Key? component2();
314 method public Key? component3();
315 method public int component4();
316 method public int component5();
317 method public androidx.paging.PagingSource.LoadResult.Page<Key,Value> copy(java.util.List<? extends Value> data, Key? prevKey, Key? nextKey, int itemsBefore, int itemsAfter);
318 method public java.util.List<Value> getData();
319 method public int getItemsAfter();
320 method public int getItemsBefore();
321 method public Key? getNextKey();
322 method public Key? getPrevKey();
323 field public static final int COUNT_UNDEFINED = -2147483648; // 0x80000000
324 field public static final androidx.paging.PagingSource.LoadResult.Page.Companion! Companion;
325 }
326
327 public static final class PagingSource.LoadResult.Page.Companion {
328 }
329
330 public final class PagingSourceKt {
331 }
332
Dustin Lamb0346022020-01-17 15:08:13 -0800333 public final class PagingState<Key, Value> {
Dustin Lam779cddb2020-03-26 12:28:43 -0700334 method public Value? closestItemToPosition(int anchorPosition);
335 method public androidx.paging.PagingSource.LoadResult.Page<Key,Value>? closestPageToPosition(int anchorPosition);
336 method public Integer? getAnchorPosition();
Dustin Lam1249ec02020-03-25 11:25:34 -0700337 method public androidx.paging.PagingConfig getConfig();
Dustin Lamb0346022020-01-17 15:08:13 -0800338 method public java.util.List<androidx.paging.PagingSource.LoadResult.Page<Key,Value>> getPages();
339 }
340
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800341 @Deprecated public abstract class PositionalDataSource<T> extends androidx.paging.DataSource<java.lang.Integer,T> {
342 ctor @Deprecated public PositionalDataSource();
343 method @Deprecated public static final int computeInitialLoadPosition(androidx.paging.PositionalDataSource.LoadInitialParams params, int totalCount);
344 method @Deprecated public static final int computeInitialLoadSize(androidx.paging.PositionalDataSource.LoadInitialParams params, int initialLoadPosition, int totalCount);
345 method @Deprecated @WorkerThread public abstract void loadInitial(androidx.paging.PositionalDataSource.LoadInitialParams params, androidx.paging.PositionalDataSource.LoadInitialCallback<T> callback);
346 method @Deprecated @WorkerThread public abstract void loadRange(androidx.paging.PositionalDataSource.LoadRangeParams params, androidx.paging.PositionalDataSource.LoadRangeCallback<T> callback);
347 method @Deprecated public final <V> androidx.paging.PositionalDataSource<V> map(androidx.arch.core.util.Function<T,V> function);
348 method @Deprecated public final <V> androidx.paging.PositionalDataSource<V> map(kotlin.jvm.functions.Function1<? super T,? extends V> function);
349 method @Deprecated public final <V> androidx.paging.PositionalDataSource<V> mapByPage(androidx.arch.core.util.Function<java.util.List<T>,java.util.List<V>> function);
350 method @Deprecated 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 Craik7cb60412018-04-04 13:02:50 -0700351 }
352
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800353 @Deprecated public abstract static class PositionalDataSource.LoadInitialCallback<T> {
354 ctor @Deprecated public PositionalDataSource.LoadInitialCallback();
355 method @Deprecated public abstract void onResult(java.util.List<? extends T> data, int position, int totalCount);
356 method @Deprecated public abstract void onResult(java.util.List<? extends T> data, int position);
Chris Craik7cb60412018-04-04 13:02:50 -0700357 }
358
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800359 @Deprecated public static class PositionalDataSource.LoadInitialParams {
360 ctor @Deprecated public PositionalDataSource.LoadInitialParams(int requestedStartPosition, int requestedLoadSize, int pageSize, boolean placeholdersEnabled);
361 field @Deprecated public final int pageSize;
362 field @Deprecated public final boolean placeholdersEnabled;
363 field @Deprecated public final int requestedLoadSize;
364 field @Deprecated public final int requestedStartPosition;
Chris Craik7cb60412018-04-04 13:02:50 -0700365 }
366
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800367 @Deprecated public abstract static class PositionalDataSource.LoadRangeCallback<T> {
368 ctor @Deprecated public PositionalDataSource.LoadRangeCallback();
369 method @Deprecated public abstract void onResult(java.util.List<? extends T> data);
Chris Craik7cb60412018-04-04 13:02:50 -0700370 }
371
Dustin Lamcee0e1e2020-02-04 15:12:18 -0800372 @Deprecated public static class PositionalDataSource.LoadRangeParams {
373 ctor @Deprecated public PositionalDataSource.LoadRangeParams(int startPosition, int loadSize);
374 field @Deprecated public final int loadSize;
375 field @Deprecated public final int startPosition;
Dustin Lamb6bab3f2019-05-20 08:05:34 -0700376 }
377
Dustin Lam4f1cfee2020-03-09 09:49:22 -0700378 public abstract class RemoteMediator<Key, Value> {
379 ctor public RemoteMediator();
380 method public suspend Object initialize(kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.InitializeAction> $completion);
Dustin Lamc9cccb62020-04-01 18:55:04 -0700381 method public abstract suspend Object load(androidx.paging.LoadType loadType, androidx.paging.PagingState<Key,Value> state, kotlin.coroutines.Continuation<? super androidx.paging.RemoteMediator.MediatorResult> p);
Dustin Lam4f1cfee2020-03-09 09:49:22 -0700382 }
383
384 public enum RemoteMediator.InitializeAction {
385 enum_constant public static final androidx.paging.RemoteMediator.InitializeAction LAUNCH_INITIAL_REFRESH;
386 enum_constant public static final androidx.paging.RemoteMediator.InitializeAction SKIP_INITIAL_REFRESH;
387 }
388
389 public abstract static sealed class RemoteMediator.MediatorResult {
390 }
391
392 public static final class RemoteMediator.MediatorResult.Error extends androidx.paging.RemoteMediator.MediatorResult {
393 ctor public RemoteMediator.MediatorResult.Error(Throwable throwable);
394 method public Throwable getThrowable();
395 }
396
397 public static final class RemoteMediator.MediatorResult.Success extends androidx.paging.RemoteMediator.MediatorResult {
Dustin Lamd87aafe2020-04-16 19:31:51 -0700398 ctor public RemoteMediator.MediatorResult.Success(boolean endOfPaginationReached);
399 method public boolean endOfPaginationReached();
Dustin Lam4f1cfee2020-03-09 09:49:22 -0700400 }
401
Chris Craik29bc4692019-12-05 09:44:57 -0800402 public final class SeparatorsKt {
Chris Craik29bc4692019-12-05 09:44:57 -0800403 }
404
Dustin Lamb6bab3f2019-05-20 08:05:34 -0700405}
406
Yigit Boyarc77bc772019-12-20 13:14:12 -0800407package androidx.paging.multicast {
408
409 public final class ChannelManagerKt {
410 }
411
412}
413