added in version 27.1.0
belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1

AsyncDifferConfig.Builder

public static final class AsyncDifferConfig.Builder
extends Object

java.lang.Object
   ↳ android.support.v7.recyclerview.extensions.AsyncDifferConfig.Builder


Builder class for AsyncDifferConfig.

Summary

Public constructors

AsyncDifferConfig.Builder(ItemCallback diffCallback)

Public methods

AsyncDifferConfig build()

Creates a AsyncListDiffer with the given parameters.

Builder setBackgroundThreadExecutor(Executor executor)

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

Inherited methods

From class java.lang.Object

Public constructors

AsyncDifferConfig.Builder

added in version 27.1.0
AsyncDifferConfig.Builder (ItemCallback diffCallback)

Parameters
diffCallback ItemCallback

Public methods

build

added in version 27.1.0
AsyncDifferConfig build ()

Creates a AsyncListDiffer with the given parameters.

Returns
AsyncDifferConfig A new AsyncDifferConfig.

setBackgroundThreadExecutor

added in version 27.1.0
Builder 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 this