Builder
class Builder<T : Any!>
kotlin.Any | |
↳ | androidx.recyclerview.widget.AsyncDifferConfig.Builder |
Builder class for AsyncDifferConfig
.
Summary
Public constructors | |
---|---|
<init>(@NonNull diffCallback: DiffUtil.ItemCallback<T>) |
Public methods | |
---|---|
AsyncDifferConfig<T> |
build() Creates a |
AsyncDifferConfig.Builder<T> |
setBackgroundThreadExecutor(executor: Executor!) If provided, defines the background executor used to calculate the diff between an old and a new list. |
Public constructors
<init>
Builder(@NonNull diffCallback: DiffUtil.ItemCallback<T>)
Public methods
build
@NonNull fun build(): AsyncDifferConfig<T>
Creates a AsyncListDiffer
with the given parameters.
Return | |
---|---|
AsyncDifferConfig<T> |
A new AsyncDifferConfig. |
setBackgroundThreadExecutor
@NonNull fun setBackgroundThreadExecutor(executor: Executor!): AsyncDifferConfig.Builder<T>
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 |
Executor!: The background executor to run list diffing. |
Return | |
---|---|
AsyncDifferConfig.Builder<T> |
this |