MutableVector
class MutableVector<T> : RandomAccess
kotlin.Any | |
↳ | androidx.compose.runtime.collection.MutableVector |
A MutableList-like structure with a simplified interface that offers faster access than ArrayList.
Summary
Public methods | |
---|---|
Boolean |
add(element: T) Adds element to the MutableVector and returns |
Unit |
Adds element to the MutableVector at the given index, shifting over any elements that are in the way. |
Boolean |
Adds all elements to the MutableVector at the given index, shifting over any elements that are in the way. |
Boolean |
addAll(index: Int, elements: MutableVector<T>) Adds all elements to the MutableVector at the given index, shifting over any elements that are in the way. |
Boolean |
Adds all elements to the end of the MutableVector and returns |
Boolean |
addAll(elements: MutableVector<T>) Adds all elements to the end of the MutableVector and returns |
Boolean |
Adds all elements to the end of the MutableVector and returns |
Boolean |
addAll(index: Int, elements: Collection<T>) Adds all elements to the MutableVector at the given index, shifting over any elements that are in the way. |
Boolean |
addAll(elements: Collection<T>) Adds all elements to the end of the MutableVector and returns |
Boolean |
Returns |
MutableList<T> |
Returns MutableList interface access to the MutableVector. |
Unit |
clear() Removes all elements in the MutableVector. |
operator Boolean |
contains(element: T) Returns |
Boolean |
containsAll(elements: List<T>) Returns |
Boolean |
containsAll(elements: Collection<T>) Returns |
Boolean |
containsAll(elements: MutableVector<T>) Returns |
Boolean |
contentEquals(other: MutableVector<T>) Returns |
Unit |
ensureCapacity(capacity: Int) Ensures that there is enough space to store capacity elements in the MutableVector. |
T |
first() Returns the first element in the MutableVector or throws a NoSuchElementException if it isEmpty. |
T |
Returns the first element in the MutableVector for which predicate returns |