ItemSnapshotList

public final class ItemSnapshotList<T extends Object>


Snapshot of data being presented by a androidx.pagingAsyncPagingDataDiffer or a PagingDataAdapter.

Summary

Public fields

final @NonNull List<@NonNull T>

The presented data, excluding placeholders.

final int

Number of placeholders after the presented items, 0 if enablePlaceholders is false.

final int

Number of placeholders before the presented items, 0 if enablePlaceholders is false.

int

Size of ItemSnapshotList including placeholders.

Public constructors

<T extends Object> ItemSnapshotList(
    @IntRange(from = 0) int placeholdersBefore,
    @IntRange(from = 0) int placeholdersAfter,
    List<T> items
)

Public methods

T
get(int index)

Returns the item at index, where index includes the position of placeholders.

Inherited methods

From class AbstractCollection
boolean
contains(T element)
boolean
containsAll(Collection<T> elements)
boolean
@NonNull String
From class AbstractList
boolean
equals(Object other)
int
int
indexOf(T element)
@NonNull Iterator<T>