AsyncDifferConfig.Builder

public final class AsyncDifferConfig.Builder<T>


Builder class for AsyncDifferConfig.

Parameters
<T>

Summary

Public constructors

Public methods

@NonNull AsyncDifferConfig<T>

Creates a AsyncListDiffer with the given parameters.

@NonNull 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
public Builder(@NonNull DiffUtil.ItemCallback<T> diffCallback)

Public methods

build

Added in 1.0.0
public @NonNull AsyncDifferConfig<T> build()

Creates a AsyncListDiffer with the given parameters.

Returns
@NonNull AsyncDifferConfig<T>

A new AsyncDifferConfig.

setBackgroundThreadExecutor

Added in 1.0.0
public @NonNull AsyncDifferConfig.Builder<T> setBackgroundThreadExecutor(@Nullable Executor executor)

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
@Nullable Executor executor

The background executor to run list diffing.