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