AsyncDifferConfig.Builder


public final class AsyncDifferConfig.Builder

Builder class for AsyncDifferConfig.

Parameters

Summary

Public constructors

Public methods

@NonNull AsyncDifferConfig

Creates a AsyncListDiffer with the given parameters.

@NonNull AsyncDifferConfig.Builder

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 diffCallback)

Public methods

build

Added in 1.0.0
public @NonNull AsyncDifferConfig build()

Creates a AsyncListDiffer with the given parameters.

Returns
@NonNull AsyncDifferConfig

A new AsyncDifferConfig.

setBackgroundThreadExecutor

Added in 1.0.0
public @NonNull AsyncDifferConfig.Builder 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.