# MutableVector

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/collection/MutableVector.kt+class:androidx.compose.runtime.collection.MutableVector) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0) Common/All
- Cmn

  ```
  class MutableVector<T : Any?> : RandomAccess
  ```

*** ** * ** ***

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html`-like structure with a simplified interface that offers faster access than `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-array-list/index.html`.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Any)(element: T)` Adds `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Int,kotlin.Any)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element: T)` Adds `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Int,kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Int,kotlin.Any)`, shifting over any elements that are in the way. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Array)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.collections.Collection)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.collections.Collection)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.collections.List)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(androidx.compose.runtime.collection.MutableVector)(elements: https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(androidx.compose.runtime.collection.MutableVector)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.Collection)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.Collection)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.Collection)`, shifting over any elements that are in the way. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.List)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.List)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.List)`, shifting over any elements that are in the way. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,androidx.compose.runtime.collection.MutableVector)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, elements: https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<T>)` Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,androidx.compose.runtime.collection.MutableVector)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,androidx.compose.runtime.collection.MutableVector)`, shifting over any elements that are in the way. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#any(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#any(kotlin.Function1)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<T>` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#asMutableList()()` Returns `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` interface access to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#clear()()` Removes all elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#contains(kotlin.Any)(element: T)` Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#contains(kotlin.Any)` or `false` otherwise. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(kotlin.collections.Collection)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)` Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains all elements in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(kotlin.collections.Collection)` or `false` if one or more are missing. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>)` Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains all elements in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(kotlin.collections.List)` or `false` if one or more are missing. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(androidx.compose.runtime.collection.MutableVector)(elements: https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<T>)` Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains all elements in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(androidx.compose.runtime.collection.MutableVector)` or `false` if one or more are missing. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#contentEquals(androidx.compose.runtime.collection.MutableVector)(other: https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<T>)` Returns `true` if the contents of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` are the same or `false` if there is any difference. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#ensureCapacity(kotlin.Int)(capacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Ensures that there is enough space to store `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#ensureCapacity(kotlin.Int)` elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#first()()` Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`. | Cmn |
| `inline T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#first(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#first(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches. | Cmn |
| `inline T?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#firstOrNull()()` Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `null` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`. | Cmn |
| `inline T?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#firstOrNull(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#firstOrNull(kotlin.Function1)` returns `true` or returns `null` if nothing matches. | Cmn |
| `inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#fold(kotlin.Any,kotlin.Function2)(initial: R, operation: (acc, T) -> R)` Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#fold(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#fold(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in order. | Cmn |
| `inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldIndexed(kotlin.Any,kotlin.Function3)(initial: R, operation: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, acc, T) -> R)` Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in order. | Cmn |
| `inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRight(kotlin.Any,kotlin.Function2)(initial: R, operation: (T, acc) -> R)` Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRight(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRight(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in reverse order. | Cmn |
| `inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRightIndexed(kotlin.Any,kotlin.Function3)(initial: R, operation: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, T, acc) -> R)` Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRightIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRightIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in reverse order. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEach(kotlin.Function1)(block: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEach(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`, in order. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachIndexed(kotlin.Function2)(block: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` along with its index, in order. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachReversed(kotlin.Function1)(block: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachReversed(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in reverse order. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachReversedIndexed(kotlin.Function2)(block: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachReversedIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` along with its index, in reverse order. | Cmn |
| `inline operator T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#get(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the element at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#get(kotlin.Int)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOf(kotlin.Any)(element: T)` Returns the index of `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOf(kotlin.Any)` in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `-1` if `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOf(kotlin.Any)` is not there. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOfFirst(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the index if the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOfFirst(kotlin.Function1)` returns `true`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOfLast(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the index if the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOfLast(kotlin.Function1)` returns `true`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()()` Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` has no elements in it or `false` otherwise. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isNotEmpty()()` Returns `true` if there are elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `false` if it is empty. | Cmn |
| `T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#last()()` Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`. | Cmn |
| `inline T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#last(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#last(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastIndexOf(kotlin.Any)(element: T)` Returns the index of the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` that is the same as `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastIndexOf(kotlin.Any)` or `-1` if no elements match. | Cmn |
| `inline T?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastOrNull()()` Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `null` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`. | Cmn |
| `inline T?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastOrNull(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastOrNull(kotlin.Function1)` returns `true` or returns `null` if nothing matches. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<R>` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#map(kotlin.Function1)(transform: (T) -> R)` Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<R>` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#mapIndexed(kotlin.Function2)(transform: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, T) -> R)` Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `inline https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<R>` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#mapIndexedNotNull(kotlin.Function2)(transform: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, T) -> R?)` Returns an `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`, excluding those transformed values that are `null`. | Cmn |
| `inline https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<R>` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#mapNotNull(kotlin.Function1)(transform: (T) -> R?)` Returns an `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`, excluding those transformed values that are `null`. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#minusAssign(kotlin.Any)(element: T)` `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#minusAssign(kotlin.Any)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#plusAssign(kotlin.Any)(element: T)` `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#plusAssign(kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#remove(kotlin.Any)(element: T)` Removes `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#remove(kotlin.Any)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(kotlin.collections.Collection)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)` Removes all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(kotlin.collections.Collection)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if anything was removed. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>)` Removes all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(kotlin.collections.List)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if anything was removed. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(androidx.compose.runtime.collection.MutableVector)(elements: https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector<T>)` Removes all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(androidx.compose.runtime.collection.MutableVector)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if anything was removed. | Cmn |
| `T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAt(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes the element at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAt(kotlin.Int)` and returns it. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeIf(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Removes items that satisfy `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeIf(kotlin.Function1)` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeRange(kotlin.Int,kotlin.Int)(start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes items from index `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeRange(kotlin.Int,kotlin.Int)` (inclusive) to `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeRange(kotlin.Int,kotlin.Int)` (exclusive). | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#retainAll(kotlin.collections.Collection)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)` Keeps only `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#retainAll(kotlin.collections.Collection)` in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and removes all other values. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#reversedAny(kotlin.Function1)(predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#reversedAny(kotlin.Function1)` while iterating in the reverse order. | Cmn |
| `operator T` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#set(kotlin.Int,kotlin.Any)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element: T)` Sets the value at `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#set(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#set(kotlin.Int,kotlin.Any)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#sortWith(kotlin.Comparator)(comparator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparator/index.html<T>)` Sorts the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` using `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#sortWith(kotlin.Comparator)` to order the items. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#sumBy(kotlin.Function1)(selector: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the sum of all values produced by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#sumBy(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indices()` Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` of the valid indices for this `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastIndex()` Returns the last valid index in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#size()` The number of elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. | Cmn |

## Public functions

### add

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun add(element: T): Boolean
```

Adds `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true`.

### add

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun add(index: Int, element: T): Unit
```

Adds `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Int,kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#add(kotlin.Int,kotlin.Any)`, shifting over any elements that are in the way.

### addAll

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun addAll(elements: Array<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Array)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed.

### addAll

Cmn

```
fun addAll(elements: Collection<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.collections.Collection)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed.

### addAll

Cmn

```
inline fun addAll(elements: List<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.collections.List)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed.

### addAll

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun addAll(elements: MutableVector<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(androidx.compose.runtime.collection.MutableVector)` to the end of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` was changed.

### addAll

Cmn

```
fun addAll(index: Int, elements: Collection<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.Collection)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.Collection)`, shifting over any elements that are in the way.

### addAll

Cmn

```
fun addAll(index: Int, elements: List<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.List)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,kotlin.collections.List)`, shifting over any elements that are in the way.

### addAll

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun addAll(index: Int, elements: MutableVector<T>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,androidx.compose.runtime.collection.MutableVector)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#addAll(kotlin.Int,androidx.compose.runtime.collection.MutableVector)`, shifting over any elements that are in the way.

### any

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun any(predicate: (T) -> Boolean): Boolean
```

Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#any(kotlin.Function1)`.

### asMutableList

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun asMutableList(): MutableList<T>
```

Returns `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` interface access to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

### clear

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun clear(): Unit
```

Removes all elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

### contains

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
operator fun contains(element: T): Boolean
```

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#contains(kotlin.Any)` or `false` otherwise.

### containsAll

Cmn

```
fun containsAll(elements: Collection<T>): Boolean
```

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains all elements in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(kotlin.collections.Collection)` or `false` if one or more are missing.

### containsAll

Cmn

```
fun containsAll(elements: List<T>): Boolean
```

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains all elements in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(kotlin.collections.List)` or `false` if one or more are missing.

### containsAll

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun containsAll(elements: MutableVector<T>): Boolean
```

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` contains all elements in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#containsAll(androidx.compose.runtime.collection.MutableVector)` or `false` if one or more are missing.

### contentEquals

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun contentEquals(other: MutableVector<T>): Boolean
```

Returns `true` if the contents of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` are the same or `false` if there is any difference. This uses equality comparisons on each element rather than reference equality.

### ensureCapacity

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun ensureCapacity(capacity: Int): Unit
```

Ensures that there is enough space to store `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#ensureCapacity(kotlin.Int)` elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

### first

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun first(): T
```

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`.

### first

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun first(predicate: (T) -> Boolean): T
```

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#first(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches.

### firstOrNull

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun firstOrNull(): T?
```

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `null` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`.

### firstOrNull

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun firstOrNull(predicate: (T) -> Boolean): T?
```

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#firstOrNull(kotlin.Function1)` returns `true` or returns `null` if nothing matches.

### fold

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun <R : Any?> fold(initial: R, operation: (acc, T) -> R): R
```

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#fold(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#fold(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in order.

### foldIndexed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun <R : Any?> foldIndexed(initial: R, operation: (index: Int, acc, T) -> R): R
```

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in order.

### foldRight

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun <R : Any?> foldRight(initial: R, operation: (T, acc) -> R): R
```

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRight(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRight(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in reverse order.

### foldRightIndexed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun <R : Any?> foldRightIndexed(initial: R, operation: (index: Int, T, acc) -> R): R
```

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRightIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#foldRightIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in reverse order.

### forEach

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun forEach(block: (T) -> Unit): Unit
```

Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEach(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`, in order.

### forEachIndexed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun forEachIndexed(block: (Int, T) -> Unit): Unit
```

Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` along with its index, in order.

### forEachReversed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun forEachReversed(block: (T) -> Unit): Unit
```

Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachReversed(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` in reverse order.

### forEachReversedIndexed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun forEachReversedIndexed(block: (Int, T) -> Unit): Unit
```

Calls `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#forEachReversedIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` along with its index, in reverse order.

### get

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline operator fun get(index: Int): T
```

Returns the element at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#get(kotlin.Int)`.

### indexOf

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun indexOf(element: T): Int
```

Returns the index of `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOf(kotlin.Any)` in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `-1` if `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOf(kotlin.Any)` is not there.

### indexOfFirst

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun indexOfFirst(predicate: (T) -> Boolean): Int
```

Returns the index if the first element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOfFirst(kotlin.Function1)` returns `true`.

### indexOfLast

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun indexOfLast(predicate: (T) -> Boolean): Int
```

Returns the index if the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#indexOfLast(kotlin.Function1)` returns `true`.

### isEmpty

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun isEmpty(): Boolean
```

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` has no elements in it or `false` otherwise.

### isNotEmpty

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun isNotEmpty(): Boolean
```

Returns `true` if there are elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `false` if it is empty.

### last

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun last(): T
```

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`.

### last

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun last(predicate: (T) -> Boolean): T
```

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#last(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches.

### lastIndexOf

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun lastIndexOf(element: T): Int
```

Returns the index of the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` that is the same as `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastIndexOf(kotlin.Any)` or `-1` if no elements match.

### lastOrNull

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun lastOrNull(): T?
```

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` or `null` if it `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#isEmpty()`.

### lastOrNull

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun lastOrNull(predicate: (T) -> Boolean): T?
```

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` for which `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#lastOrNull(kotlin.Function1)` returns `true` or returns `null` if nothing matches.

### map

Cmn

```
inline fun <R : Any?> map(transform: (T) -> R): Array<R>
```

Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. The Array will be the same size as this.

### mapIndexed

Cmn

```
inline fun <R : Any?> mapIndexed(transform: (index: Int, T) -> R): Array<R>
```

Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. The Array will be the same size as this.

### mapIndexedNotNull

Cmn

```
inline fun <R : Any?> mapIndexedNotNull(transform: (index: Int, T) -> R?): MutableVector<R>
```

Returns an `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`, excluding those transformed values that are `null`.

### mapNotNull

Cmn

```
inline fun <R : Any?> mapNotNull(transform: (T) -> R?): MutableVector<R>
```

Returns an `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` of results of transforming each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`, excluding those transformed values that are `null`.

### minusAssign

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline operator fun minusAssign(element: T): Unit
```

`https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#minusAssign(kotlin.Any)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`

### plusAssign

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline operator fun plusAssign(element: T): Unit
```

`https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#plusAssign(kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

### remove

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun remove(element: T): Boolean
```

Removes `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#remove(kotlin.Any)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`. If `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#remove(kotlin.Any)` was in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and was removed, `true` will be returned, or `false` will be returned if the element was not found.

### removeAll

Cmn

```
fun removeAll(elements: Collection<T>): Boolean
```

Removes all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(kotlin.collections.Collection)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if anything was removed.

### removeAll

Cmn

```
fun removeAll(elements: List<T>): Boolean
```

Removes all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(kotlin.collections.List)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if anything was removed.

### removeAll

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun removeAll(elements: MutableVector<T>): Boolean
```

Removes all `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAll(androidx.compose.runtime.collection.MutableVector)` from the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and returns `true` if anything was removed.

### removeAt

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun removeAt(index: Int): T
```

Removes the element at the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeAt(kotlin.Int)` and returns it.

### removeIf

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.6.0)

```
inline fun removeIf(predicate: (T) -> Boolean): Unit
```

Removes items that satisfy `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeIf(kotlin.Function1)`

### removeRange

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
fun removeRange(start: Int, end: Int): Unit
```

Removes items from index `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeRange(kotlin.Int,kotlin.Int)` (inclusive) to `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#removeRange(kotlin.Int,kotlin.Int)` (exclusive).

### retainAll

Cmn

```
fun retainAll(elements: Collection<T>): Boolean
```

Keeps only `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#retainAll(kotlin.collections.Collection)` in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` and removes all other values.

### reversedAny

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun reversedAny(predicate: (T) -> Boolean): Boolean
```

Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#reversedAny(kotlin.Function1)` while iterating in the reverse order.

### set

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
operator fun set(index: Int, element: T): T
```

Sets the value at `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#set(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#set(kotlin.Int,kotlin.Any)`.

### sortWith

Cmn

```
fun sortWith(comparator: Comparator<T>): Unit
```

Sorts the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector` using `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#sortWith(kotlin.Comparator)` to order the items.

### sumBy

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
inline fun sumBy(selector: (T) -> Int): Int
```

Returns the sum of all values produced by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector#sumBy(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

## Public properties

### indices

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
val indices: IntRange
```

Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` of the valid indices for this `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

### lastIndex

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
val lastIndex: Int
```

Returns the last valid index in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.

### size

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
val size: Int
```

The number of elements in the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/collection/MutableVector`.