Builder

class Builder<T : Any!>
kotlin.Any
   ↳ androidx.recyclerview.widget.AsyncDifferConfig.Builder

Builder class for AsyncDifferConfig.

Summary

Public constructors
<init>(diffCallback: DiffUtil.ItemCallback<T>)

Public methods
AsyncDifferConfig.Builder<T>

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

AsyncDifferConfig<T>

Creates a AsyncListDiffer with the given parameters.

Public constructors

<init>

Builder(diffCallback: DiffUtil.ItemCallback<T>)

Public methods

setBackgroundThreadExecutor

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

build

fun build(): AsyncDifferConfig<T>

Creates a AsyncListDiffer with the given parameters.

Return
AsyncDifferConfig<T>: A new AsyncDifferConfig.