-
public final class BrvahAsyncDifferConfig.Builder<T extends Object>Builder class for BrvahAsyncDifferConfig.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBrvahAsyncDifferConfig.Builder.Companion
-
Constructor Summary
Constructors Constructor Description BrvahAsyncDifferConfig.Builder(DiffUtil.ItemCallback<T> mDiffCallback)
-
Method Summary
Modifier and Type Method Description final BrvahAsyncDifferConfig.Builder<T>setMainThreadExecutor(Executor executor)If provided, defines the main thread executor used to dispatch adapter update notifications on the main thread. final BrvahAsyncDifferConfig.Builder<T>setBackgroundThreadExecutor(Executor executor)If provided, defines the background executor used to calculate the diff between an old and a new list. final BrvahAsyncDifferConfig<T>build()Creates a BrvahAsyncDifferConfig with the given parameters. -
-
Constructor Detail
-
BrvahAsyncDifferConfig.Builder
BrvahAsyncDifferConfig.Builder(DiffUtil.ItemCallback<T> mDiffCallback)
-
-
Method Detail
-
setMainThreadExecutor
final BrvahAsyncDifferConfig.Builder<T> setMainThreadExecutor(Executor executor)
If provided, defines the main thread executor used to dispatch adapter update notifications on the main thread.
If not provided, it will default to the main thread.
- Parameters:
executor- The executor which can run tasks in the UI thread.
-
setBackgroundThreadExecutor
final BrvahAsyncDifferConfig.Builder<T> setBackgroundThreadExecutor(Executor executor)
If provided, defines the background executor used to calculate the diff between an old and a new list.
If not provided, defaults to two thread pool executor, shared by all ListAdapterConfigs.
- Parameters:
executor- The background executor to run list diffing.
-
build
final BrvahAsyncDifferConfig<T> build()
Creates a BrvahAsyncDifferConfig with the given parameters.
-
-
-
-