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