Mutable Vector
A MutableList-like structure with a simplified interface that offers faster access than ArrayList.
Functions
add
Link copied to clipboard
Adds element to the MutableVector at the given index, shifting over any elements that are in the way.
addAll
Link copied to clipboard
Adds all elements to the end of the MutableVector and returns
true if the MutableVector was changed.Adds all elements to the end of the MutableVector and returns
true if the MutableVector was changed.Adds all elements to the end of the MutableVector and returns
true if the MutableVector was changed.Adds all elements to the end of the MutableVector and returns
true if the MutableVector was changed.Adds all elements to the MutableVector at the given index, shifting over any elements that are in the way.
Adds all elements to the MutableVector at the given index, shifting over any elements that are in the way.
asMutableList
Link copied to clipboard
clear
Link copied to clipboard
contains
Link copied to clipboard
containsAll
Link copied to clipboard
Returns
true if the MutableVector contains all elements in elements or false if one or more are missing.Returns
true if the MutableVector contains all elements in elements or false if one or more are missing.Returns
true if the MutableVector contains all elements in elements or false if one or more are missing.contentEquals
Link copied to clipboard
ensureCapacity
Link copied to clipboard
first
Link copied to clipboard
Returns the first element in the MutableVector for which predicate returns
true or throws NoSuchElementException if nothing matches.firstOrNull
Link copied to clipboard
Returns the first element in the MutableVector for which predicate returns
true or returns null if nothing matches.foldIndexed
Link copied to clipboard
Accumulates values, starting with initial, and applying operation to each element in the MutableVector in order.
foldRightIndexed
Link copied to clipboard
Accumulates values, starting with initial, and applying operation to each element in the MutableVector in reverse order.
forEach
Link copied to clipboard
forEachIndexed
Link copied to clipboard
forEachReversed
Link copied to clipboard
forEachReversedIndexed
Link copied to clipboard
indexOf
Link copied to clipboard
indexOfFirst
Link copied to clipboard
indexOfLast
Link copied to clipboard
isEmpty
Link copied to clipboard
isNotEmpty
Link copied to clipboard
last
Link copied to clipboard
Returns the last element in the MutableVector for which predicate returns
true or throws NoSuchElementException if nothing matches.lastIndexOf
Link copied to clipboard
Returns the index of the last element in the MutableVector that is the same as element or
-1 if no elements match.lastOrNull
Link copied to clipboard
Returns the last element in the MutableVector for which predicate returns
true or returns null if nothing matches.mapIndexed
Link copied to clipboard
mapIndexedNotNull
Link copied to clipboard
inline fun <R> mapIndexedNotNull(transform: (index: Int, T) -> R?): MutableVector<R>
Content copied to clipboard
Returns an MutableVector of results of transforming each element in the MutableVector, excluding those transformed values that are
null.mapNotNull
Link copied to clipboard
Returns an MutableVector of results of transforming each element in the MutableVector, excluding those transformed values that are
null.minusAssign
Link copied to clipboard
plusAssign
Link copied to clipboard
remove
Link copied to clipboard
removeAll
Link copied to clipboard
removeRange
Link copied to clipboard
retainAll
Link copied to clipboard
reversedAny
Link copied to clipboard
sortWith
Link copied to clipboard
Properties
indices
Link copied to clipboard
Returns an IntRange of the valid indices for this MutableVector.
lastIndex
Link copied to clipboard
Returns the last valid index in the MutableVector.
size
Link copied to clipboard
The number of elements in the MutableVector.