AsyncDifferConfig.Builder
public final class AsyncDifferConfig.Builder<T>
Builder class for AsyncDifferConfig.
| Parameters | |
|---|---|
<T> |
Summary
Public constructors |
|---|
Builder(@NonNull DiffUtil.ItemCallback<T> diffCallback) |
Public methods |
|
|---|---|
@NonNull AsyncDifferConfig<T> |
build()Creates a |
@NonNull AsyncDifferConfig.Builder<T> |
setBackgroundThreadExecutor(@Nullable Executor executor)If provided, defines the background executor used to calculate the diff between an old and a new list. |
Public constructors
Public methods
build
Added in 1.0.0
public @NonNull AsyncDifferConfig<T> build()
Creates a AsyncListDiffer with the given parameters.
| Returns | |
|---|---|
@NonNull AsyncDifferConfig<T> |
A new AsyncDifferConfig. |
setBackgroundThreadExecutor
Added in 1.0.0
public @NonNull AsyncDifferConfig.Builder<T> setBackgroundThreadExecutor(@Nullable Executor executor)
If provided, defines the background executor used to calculate the diff between an old and a new list.
If not provided or null, defaults to two thread pool executor, shared by all ListAdapterConfigs.
| Returns | |
|---|---|
@NonNull AsyncDifferConfig.Builder<T> |
this |