androidx.compose.runtime.collection
Classes
MutableVector |
A |
Cmn
|
Top-level functions summary
inline MutableVector<T> |
<T : Any?> MutableVector(capacity: Int)Create a |
Cmn
|
inline MutableVector<T> |
<T : Any?> MutableVector(size: Int, noinline init: (Int) -> T)Create a |
Cmn
|
inline MutableVector<T> |
<T : Any?> mutableVectorOf()Creates an empty |
Cmn
|
inline MutableVector<T> |
<T : Any?> mutableVectorOf(vararg elements: T)Creates a |
Cmn
|
Top-level functions
MutableVector
inline fun <T : Any?> MutableVector(capacity: Int = 16): MutableVector<T>
Create a MutableVector with a given initial capacity.
| See also | |
|---|---|
ensureCapacity |
MutableVector
inline fun <T : Any?> MutableVector(size: Int, noinline init: (Int) -> T): MutableVector<T>
Create a MutableVector with a given size, initializing each element using the init function.
init is called for each element in the MutableVector, starting from the first one and should return the value to be assigned to the element at its given index.
mutableVectorOf
inline fun <T : Any?> mutableVectorOf(): MutableVector<T>
Creates an empty MutableVector with a capacity of 16.
mutableVectorOf
inline fun <T : Any?> mutableVectorOf(vararg elements: T): MutableVector<T>
Creates a MutableVector with the given values. This will use the passed vararg elements storage.