androidx.compose.runtime.collection

Classes

MutableVector

This class is deprecated. Use androidx.collection.MutableObjectList instead.

Cmn

Top-level functions summary

inline MutableVector<T>
<T : Any?> MutableVector(capacity: Int)

This function is deprecated. Use androidx.collection.MutableObjectList instead.

Cmn
inline MutableVector<T>
<T : Any?> MutableVector(size: Int, noinline init: (Int) -> T)

This function is deprecated. Use androidx.collection.MutableObjectList instead.

Cmn
inline MutableVector<T>
<T : Any?> mutableVectorOf()

This function is deprecated. Use androidx.collection.mutableObjectListOf instead.

Cmn
inline MutableVector<T>
<T : Any?> mutableVectorOf(vararg elements: T)

This function is deprecated. Use androidx.collection.mutableObjectListOf instead.

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.