AsyncDifferConfig.Builder


class AsyncDifferConfig.Builder<T>


Builder class for AsyncDifferConfig.

Parameters
<T>

Summary

Public constructors

Builder(diffCallback: DiffUtil.ItemCallback<T!>)

Public functions

AsyncDifferConfig<T!>

Creates a AsyncListDiffer with the given parameters.

AsyncDifferConfig.Builder<T!>

If provided, defines the background executor used to calculate the diff between an old and a new list.

Public constructors

Builder

Added in 1.0.0
Builder(diffCallback: DiffUtil.ItemCallback<T!>)

Public functions

build

Added in 1.0.0
fun build(): AsyncDifferConfig<T!>

Creates a AsyncListDiffer with the given parameters.

Returns
AsyncDifferConfig<T!>

A new AsyncDifferConfig.

setBackgroundThreadExecutor

Added in 1.0.0
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 or null, defaults to two thread pool executor, shared by all ListAdapterConfigs.

Parameters
executor: Executor?

The background executor to run list diffing.

Returns
AsyncDifferConfig.Builder<T!>

this