added in version 1.0.0
belongs to Maven artifact androidx.recyclerview:recyclerview:1.0.0-beta01

AsyncDifferConfig.Builder

public static final class AsyncDifferConfig.Builder
extends Object

java.lang.Object
   ↳ androidx.recyclerview.widget.AsyncDifferConfig.Builder<T>


Builder class for AsyncDifferConfig.

Summary

Public constructors

AsyncDifferConfig.Builder(ItemCallback<T> diffCallback)

Public methods

AsyncDifferConfig<T> build()

Creates a AsyncListDiffer with the given parameters.

Builder<T> setBackgroundThreadExecutor(Executor executor)

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

Inherited methods

Public constructors

AsyncDifferConfig.Builder

added in version 1.0.0
public AsyncDifferConfig.Builder (ItemCallback<T> diffCallback)

Parameters
diffCallback ItemCallback

Public methods

build

added in version 1.0.0
public AsyncDifferConfig<T> build ()

Creates a AsyncListDiffer with the given parameters.

Returns
AsyncDifferConfig<T> A new AsyncDifferConfig.

setBackgroundThreadExecutor

added in version 1.0.0
public 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 Executor: The background executor to run list diffing.

Returns
Builder<T> this