Package androidx.compose.runtime.collection

Types

MutableVector
Link copied to clipboard
common
class MutableVector<T> : RandomAccess
A MutableList-like structure with a simplified interface that offers faster access than ArrayList.

Functions

MutableVector
Link copied to clipboard
common
inline fun <T> MutableVector(capacity: Int = 16): MutableVector<T>
Create a MutableVector with a given initial capacity.
inline fun <T> MutableVector(size: Int, noinline init: (Int) -> T): MutableVector<T>
Create a MutableVector with a given size, initialiing each element using the init function.
mutableVectorOf
Link copied to clipboard
common
inline fun <T> mutableVectorOf(): MutableVector<T>
Creates an empty MutableVector with a capacity of 16.
inline fun <T> mutableVectorOf(vararg elements: T): MutableVector<T>
Creates a MutableVector with the given values.