ItemSnapshotList
-
Cmn
class ItemSnapshotList<T : Any?> : AbstractList
| kotlin.Any | |||
| ↳ | kotlin.collections.AbstractCollection | ||
| ↳ | kotlin.collections.AbstractList | ||
| ↳ | androidx.paging.ItemSnapshotList |
Snapshot of data being presented by a androidx.pagingAsyncPagingDataDiffer or a androidx.paging.PagingDataAdapter.
Summary
Public constructors |
|
|---|---|
|
Cmn
|
Public functions |
||
|---|---|---|
open operator T? |
Returns the item at |
Cmn
|
Public properties |
||
|---|---|---|
List<T> |
The presented data, excluding placeholders. |
Cmn
|
Int |
Number of placeholders after the presented |
Cmn
|
Int |
Number of placeholders before the presented |
Cmn
|
open Int |
Size of |
Cmn
|
Inherited functions |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public functions
get
open operator fun get(index: Int): T?
Returns the item at index, where index includes the position of placeholders. If index points to the position of a placeholder, null is returned.
To get the size using an index excluding placeholders, use List.size on items directly.
Public properties
placeholdersAfter
val placeholdersAfter: Int
Number of placeholders after the presented items, 0 if enablePlaceholders is false.
placeholdersBefore
val placeholdersBefore: Int
Number of placeholders before the presented items, 0 if enablePlaceholders is false.