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