SnapshotStateList
@Stable class SnapshotStateList<T> : MutableList<T>, StateObject
kotlin.Any | |
↳ | androidx.compose.runtime.snapshots.SnapshotStateList |
An implementation of MutableList that can be observed and snapshot. This is the result type created by androidx.compose.mutableStateListOf.
This class closely implements the same semantics as ArrayList.
Summary
Nested classes | |
---|---|
This is an internal implementation class of SnapshotStateList. |
Public constructors | |
---|---|
<init>() An implementation of MutableList that can be observed and snapshot. |
Public methods | |
---|---|
Boolean |
add(element: T) |
Unit | |
Boolean |
addAll(index: Int, elements: Collection<T>) |
Boolean |
addAll(elements: Collection<T>) |
Unit |
clear() |
Boolean |
contains(element: T) |
Boolean |
containsAll(elements: Collection<T>) |
T | |
Int |
indexOf(element: T) |
Boolean |
isEmpty() |
MutableIterator<T> |
iterator() |
Int |
lastIndexOf(element: T) |
MutableListIterator<T> | |
MutableListIterator<T> |
listIterator(index: Int) |
Unit |
prependStateRecord(value: StateRecord) Add a new state record to the beginning of a list. |
Boolean |
remove(element: T) |
Boolean |
removeAll(elements: Collection<T>) |
T | |
Unit |
removeRange(fromIndex: Int, toIndex: Int) |
Boolean |
retainAll(elements: Collection<T>) |
T | |
MutableList<T> |
Inherited functions | |
---|---|
Inherited extension functions | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From androidx.compose.ui.gesture.kotlin.collections.List
|
||||||||||||||||||
From androidx.wear.complications.data.kotlin.collections.Collection
|
||||||||||||||||||
From androidx.compose.ui.util.kotlin.collections.List
|
||||||||||||||||||
From androidx.compose.runtime.kotlin.collections.Collection
|
||||||||||||||||||
From androidx.compose.runtime.kotlin.collections.Iterable
|