# MutableObjectList

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/ObjectList.kt+class:androidx.collection.MutableObjectList) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  class MutableObjectList<E : Any?> : ObjectList<E>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.collection.ObjectList](https://developer.android.com/reference/kotlin/androidx/collection/ObjectList)\<E\> ||
|   | ↳ | [androidx.collection.MutableObjectList](https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList) |

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` is a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html`-like collection for reference types. It is optimized for fast access, avoiding virtual and interface method access. Methods avoid allocation whenever possible. For example `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#forEach(kotlin.Function1)` does not need allocate an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterator/index.html`.

This implementation is not thread-safe: if multiple threads access this container concurrently, and one or more threads modify the structure of the list (insertion or removal for instance), the calling code must provide the appropriate synchronization. It is also not safe to mutate during reentrancy -- in the middle of a `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#forEach(kotlin.Function1)`, for example. However, concurrent reads are safe.

**Note** `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` access is available through `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#asList()` when developers need access to the common API.

**Note** `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` access is available through `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#asMutableList()` when developers need access to the common API.

It is best to use this for all internal implementations where a list of reference types is needed. Use `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` in public API to take advantage of the commonly-used interface. It is common to use `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` internally and use `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#asMutableList()` or `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#asList()` to get a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` or `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` interface for interacting with public APIs.

MutableLongList

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` |   |
| `https://developer.android.com/reference/kotlin/androidx/collection/MutableFloatList` |   |
| `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntList` |   |

## Summary

| ### Public constructors |
|---|---|
| `<E : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#MutableObjectList(kotlin.Int)(initialCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Any)(element: E)` Adds `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element: E)` Adds `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)` and after, if any. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Array)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Array)` was empty. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.Iterable)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.Iterable)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.Iterable)` was empty. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.List)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.List)` was empty. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ObjectList)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ObjectList)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ObjectList)` was empty. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ScatterSet)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ScatterSet<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ScatterSet)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ScatterSet)` was empty. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.sequences.Sequence)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.sequences.Sequence)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.sequences.Sequence)` was empty. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)` and after, if any. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)` and after, if any. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)` and after, if any. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<E>` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#asList()()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` view into the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<E>` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#asMutableList()()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` view into the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#clear()()` Removes all elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#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/collection/MutableObjectList#ensureCapacity(kotlin.Int)` elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.Any)(element: E)` `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.Any)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.Array)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.collections.Iterable)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.collections.Iterable)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.collections.List)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(androidx.collection.ObjectList)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(androidx.collection.ObjectList)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(androidx.collection.ScatterSet)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ScatterSet<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(androidx.collection.ScatterSet)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.sequences.Sequence)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.sequences.Sequence)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.Any)(element: E)` `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.Array)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.collections.Iterable)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.collections.Iterable)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.collections.List)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(androidx.collection.ObjectList)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(androidx.collection.ObjectList)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(androidx.collection.ScatterSet)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ScatterSet<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(androidx.collection.ScatterSet)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.sequences.Sequence)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<E>)` Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.sequences.Sequence)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#remove(kotlin.Any)(element: E)` Removes `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#remove(kotlin.Any)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(kotlin.Array)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` 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/collection/MutableObjectList#removeAll(kotlin.collections.Iterable)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(kotlin.collections.Iterable)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` 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/collection/MutableObjectList#removeAll(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(kotlin.collections.List)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` 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/collection/MutableObjectList#removeAll(androidx.collection.ObjectList)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(androidx.collection.ObjectList)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` 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/collection/MutableObjectList#removeAll(androidx.collection.ScatterSet)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ScatterSet<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(androidx.collection.ScatterSet)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` 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/collection/MutableObjectList#removeAll(kotlin.sequences.Sequence)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<E>)` Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAll(kotlin.sequences.Sequence)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if anything was removed. | Cmn |
| `E` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAt(kotlin.Int)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes the element at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#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/collection/MutableObjectList#removeIf(kotlin.Function1)(predicate: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Removes all elements in this list for which `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeIf(kotlin.Function1)` returns `true`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeRange(kotlin.Int,kotlin.Int)(start: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes elements from index `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeRange(kotlin.Int,kotlin.Int)` (inclusive) to `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#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/collection/MutableObjectList#retainAll(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)` Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.Array)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.collections.Collection)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<E>)` Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.collections.Collection)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.collections.Iterable)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<E>)` Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.collections.Iterable)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(androidx.collection.ObjectList)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)` Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(androidx.collection.ObjectList)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.sequences.Sequence)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<E>)` Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.sequences.Sequence)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values. | Cmn |
| `operator E` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#set(kotlin.Int,kotlin.Any)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element: E)` Sets the value at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#set(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#set(kotlin.Int,kotlin.Any)`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<R>> https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortBy(kotlin.Function1)(crossinline selector: (element) -> R?)` Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using values produced by `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortBy(kotlin.Function1)` in ascending order. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<R>> https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortByDescending(kotlin.Function1)(crossinline selector: (element) -> R?)` Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using values produced by `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortByDescending(kotlin.Function1)` in descending order. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortWith(kotlin.Comparator)(comparator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparator/index.html<E>)` Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortWith(kotlin.Comparator)`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortWith(kotlin.Function2)(crossinline comparison: (a, b) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortWith(kotlin.Function2)` function. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#trim(kotlin.Int)(minCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Reduces the internal storage. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#capacity()` Returns the total number of elements that can be held before the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` must grow. | Cmn |

| ### Extension functions |
|---|---|---|
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<E : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<E>> https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList<E>.https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#(androidx.collection.MutableObjectList).sort()()` Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html` elements in-place in ascending order. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<E : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<E>> https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList<E>.https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#(androidx.collection.MutableObjectList).sortDescending()()` Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html` elements in-place in descending order. | Cmn |

### Inherited functions

From [androidx.collection.ObjectList](https://developer.android.com/reference/kotlin/androidx/collection/ObjectList) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#any()()`

Returns `true` if there's at least one element in the collection.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#any(kotlin.Function1)(predicate: (element) -> 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/collection/ObjectList#any(kotlin.Function1)`.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Function1)(
fromIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
toIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
comparison: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)`

Searches this `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or its range for an element for which the given `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Function1)` function returns zero using binary search algorithm.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearch(kotlin.Any,kotlin.Comparator,kotlin.Int,kotlin.Int)(
element: E,
comparator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparator/index.html<E>,
fromIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
toIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html
)`

Searches this `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or its range for the provided `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearch(kotlin.Any,kotlin.Comparator,kotlin.Int,kotlin.Int)` using the specified `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearch(kotlin.Any,kotlin.Comparator,kotlin.Int,kotlin.Int)` across elements.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `<K : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<K>> https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearchBy(kotlin.Comparable,kotlin.Int,kotlin.Int,kotlin.Function1)(
key: K?,
fromIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
toIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
crossinline selector: (element) -> K?
)`

Searches this `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or its range for an element having a key returned by `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearchBy(kotlin.Comparable,kotlin.Int,kotlin.Int,kotlin.Function1)` equal to the specified `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#binarySearchBy(kotlin.Comparable,kotlin.Int,kotlin.Int,kotlin.Function1)` using binary search algorithm.
Cmn `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#contains(kotlin.Any)(element: E)`

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` contains `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#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/collection/ObjectList#containsAll(kotlin.Array)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<E>)`

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` contains all elements in `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#containsAll(kotlin.Array)` 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/collection/ObjectList#containsAll(kotlin.collections.Iterable)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<E>)`

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` contains all elements in `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#containsAll(kotlin.collections.Iterable)` 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/collection/ObjectList#containsAll(kotlin.collections.List)(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<E>)`

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` contains all elements in `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#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/collection/ObjectList#containsAll(androidx.collection.ObjectList)(elements: https://developer.android.com/reference/kotlin/androidx/collection/ObjectList<E>)`

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` contains all elements in `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#containsAll(androidx.collection.ObjectList)` or `false` if one or more are missing.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#count()()`

Returns the number of elements in this list.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#count(kotlin.Function1)(predicate: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Counts the number of elements matching `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#count(kotlin.Function1)`.
Cmn `E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAt(kotlin.Int)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns the element at the given `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAt(kotlin.Int)` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAt(kotlin.Int)` is out of bounds of this collection.
Cmn `inline E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAtOrElse(kotlin.Int,kotlin.Function1)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, defaultValue: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) -> E)`

Returns the element at the given `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAtOrElse(kotlin.Int,kotlin.Function1)` or `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAtOrElse(kotlin.Int,kotlin.Function1)` if `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#elementAtOrElse(kotlin.Int,kotlin.Function1)` is out of bounds of the collection.
Cmn `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Returns `true` if `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#equals(kotlin.Any)` is a `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` and the contents of this and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#equals(kotlin.Any)` are the same.
Cmn `E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#first()()`

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` 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/collection/ObjectList#isEmpty()`.
Cmn `inline E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#first(kotlin.Function1)(predicate: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` for which `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#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 E?` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#firstOrNull()()`

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or `null` if it `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#isEmpty()`.
Cmn `inline E?` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#firstOrNull(kotlin.Function1)(predicate: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns the first element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` for which `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#firstOrNull(kotlin.Function1)` returns `true` or `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/collection/ObjectList#fold(kotlin.Any,kotlin.Function2)(initial: R, operation: (acc, element) -> R)`

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#fold(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#fold(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` in order.
Cmn `inline R` `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldIndexed(kotlin.Any,kotlin.Function3)(initial: R, operation: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, acc, element) -> R)`

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` in order.
Cmn `inline R` `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldRight(kotlin.Any,kotlin.Function2)(initial: R, operation: (element, acc) -> R)`

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldRight(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldRight(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` 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/collection/ObjectList#foldRightIndexed(kotlin.Any,kotlin.Function3)(initial: R, operation: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element, acc) -> R)`

Accumulates values, starting with `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldRightIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#foldRightIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` in reverse order.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEach(kotlin.Function1)(block: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Calls `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEach(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList`, in order.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEachIndexed(kotlin.Function2)(block: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Calls `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEachIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` 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/collection/ObjectList#forEachReversed(kotlin.Function1)(block: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Calls `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEachReversed(kotlin.Function1)` for each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` in reverse order.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEachReversedIndexed(kotlin.Function2)(block: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Calls `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#forEachReversedIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` along with its index, in reverse order.
Cmn `operator E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#get(kotlin.Int)(index: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns the element at the given `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#get(kotlin.Int)` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#get(kotlin.Int)` is out of bounds of this collection.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#hashCode()()`

Returns a hash code based on the contents of the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#indexOf(kotlin.Any)(element: E)`

Returns the index of `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#indexOf(kotlin.Any)` in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or `-1` if `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#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/collection/ObjectList#indexOfFirst(kotlin.Function1)(predicate: (element) -> 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/collection/ObjectList` for which `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#indexOfFirst(kotlin.Function1)` returns `true` or -1 if there was no element for which predicate returned `true`.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#indexOfLast(kotlin.Function1)(predicate: (element) -> 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/collection/ObjectList` for which `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#indexOfLast(kotlin.Function1)` returns `true` or -1 if there was no element for which predicate returned `true`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#isEmpty()()`

Returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` has no elements in it or `false` otherwise.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#isNotEmpty()()`

Returns `true` if there are elements in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or `false` if it is empty.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)(
separator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
postfix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
limit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
truncated: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
transform: ((E) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)?
)`

Creates a String from the elements separated by `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` and using `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` before and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` after, if supplied.
Cmn `E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#last()()`

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` 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/collection/ObjectList#isEmpty()`.
Cmn `inline E` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#last(kotlin.Function1)(predicate: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` for which `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#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/collection/ObjectList#lastIndexOf(kotlin.Any)(element: E)`

Returns the index of the last element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` that is the same as `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastIndexOf(kotlin.Any)` or `-1` if no elements match.
Cmn `inline E?` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastOrNull()()`

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` or `null` if it `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#isEmpty()`.
Cmn `inline E?` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastOrNull(kotlin.Function1)(predicate: (element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns the last element in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` for which `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastOrNull(kotlin.Function1)` returns `true` or `null` if nothing matches.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#none()()`

Returns `true` if the collection has no elements in it.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#reversedAny(kotlin.Function1)(predicate: (element) -> 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/collection/ObjectList#reversedAny(kotlin.Function1)` while iterating in the reverse order.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#toString()()`

Returns a String representation of the list, surrounded by "\[\]" and each element separated by ", ".
Cmn

### Inherited properties

From [androidx.collection.ObjectList](https://developer.android.com/reference/kotlin/androidx/collection/ObjectList) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#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/collection/ObjectList`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastIndex()`

Returns the last valid index in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`

The number of elements in the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList`.
Cmn

## Public constructors

### MutableObjectList

Cmn

```
<E : Any?> MutableObjectList(initialCapacity: Int = 16)
```

## Public functions

### add

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

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

### add

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun add(index: @IntRange(from = 0) Int, element: E): Unit
```

Adds `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)` and after, if any.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#add(kotlin.Int,kotlin.Any)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`, inclusive |

### addAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

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

### addAll

Cmn

```
fun addAll(elements: Iterable<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.Iterable)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.collections.Iterable)` was empty.

### addAll

Cmn

```
fun addAll(elements: List<E>): Boolean
```

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

### addAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun addAll(elements: ObjectList<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ObjectList)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ObjectList)` was empty.

### addAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun addAll(elements: ScatterSet<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ScatterSet)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(androidx.collection.ScatterSet)` was empty.

### addAll

Cmn

```
fun addAll(elements: Sequence<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.sequences.Sequence)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and returns `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.sequences.Sequence)` was empty.

### addAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun addAll(index: @IntRange(from = 0) Int, elements: Array<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)` and after, if any.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)` was empty |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.Array)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`, inclusive. |

### addAll

Cmn

```
fun addAll(index: @IntRange(from = 0) Int, elements: Collection<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)` and after, if any.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)` was empty |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,kotlin.collections.Collection)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`, inclusive. |

### addAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun addAll(index: @IntRange(from = 0) Int, elements: ObjectList<E>): Boolean
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)` to the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` at the given `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)`, shifting over any elements at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)` and after, if any.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` was changed or `false` if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)` was empty |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#addAll(kotlin.Int,androidx.collection.ObjectList)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`, inclusive |

### asList

Cmn

```
open fun asList(): List<E>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` view into the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList`. All access to the collection will be less efficient and abides by the allocation requirements of the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html`. For example, `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/index.html` will allocate an iterator. All access will go through the more expensive interface calls. Critical performance areas should use the `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList` API rather than `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` API, when possible.

### asMutableList

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` view into the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. All access to the collection will be less efficient and abides by the allocation requirements of the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html`. For example, `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/index.html` will allocate an iterator. All access will go through the more expensive interface calls. Critical performance areas should use the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` API rather than `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html` API, when possible.

### clear

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

Removes all elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`. The storage isn't released.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#trim(kotlin.Int)` |   |

### ensureCapacity

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#trim(kotlin.Int)` |   |

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

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

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun minusAssign(elements: Array<E>): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.Array)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### minusAssign

Cmn

```
operator fun minusAssign(elements: Iterable<E>): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.collections.Iterable)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### minusAssign

Cmn

```
operator fun minusAssign(elements: List<E>): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.collections.List)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun minusAssign(elements: ObjectList<E>): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(androidx.collection.ObjectList)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun minusAssign(elements: ScatterSet<E>): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(androidx.collection.ScatterSet)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### minusAssign

Cmn

```
operator fun minusAssign(elements: Sequence<E>): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#minusAssign(kotlin.sequences.Sequence)` from the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### plusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

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

### plusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun plusAssign(elements: Array<E>): Unit
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.Array)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### plusAssign

Cmn

```
operator fun plusAssign(elements: Iterable<E>): Unit
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.collections.Iterable)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### plusAssign

Cmn

```
operator fun plusAssign(elements: List<E>): Unit
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.collections.List)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### plusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun plusAssign(elements: ObjectList<E>): Unit
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(androidx.collection.ObjectList)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### plusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun plusAssign(elements: ScatterSet<E>): Unit
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(androidx.collection.ScatterSet)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### plusAssign

Cmn

```
operator fun plusAssign(elements: Sequence<E>): Unit
```

Adds all `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#plusAssign(kotlin.sequences.Sequence)` to the end of the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList`.

### remove

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

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

### removeAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun removeAll(elements: Array<E>): Boolean
```

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

### removeAll

Cmn

```
fun removeAll(elements: Iterable<E>): Boolean
```

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

### removeAll

Cmn

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

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

### removeAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun removeAll(elements: ObjectList<E>): Boolean
```

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

### removeAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun removeAll(elements: ScatterSet<E>): Boolean
```

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

### removeAll

Cmn

```
fun removeAll(elements: Sequence<E>): Boolean
```

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

### removeAt

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun removeAt(index: @IntRange(from = 0) Int): E
```

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

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeAt(kotlin.Int)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastIndex()`, inclusive |

### removeIf

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

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

Removes all elements in this list for which `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeIf(kotlin.Function1)` returns `true`.

### removeRange

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun removeRange(start: @IntRange(from = 0) Int, end: @IntRange(from = 0) Int): Unit
```

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

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeRange(kotlin.Int,kotlin.Int)` or `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeRange(kotlin.Int,kotlin.Int)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`, inclusive |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeRange(kotlin.Int,kotlin.Int)` is greater than `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#removeRange(kotlin.Int,kotlin.Int)` |

### retainAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun retainAll(elements: Array<E>): Boolean
```

Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.Array)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` has changed. |

### retainAll

Cmn

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

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` has changed. |

### retainAll

Cmn

```
fun retainAll(elements: Iterable<E>): Boolean
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` has changed. |

### retainAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun retainAll(elements: ObjectList<E>): Boolean
```

Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(androidx.collection.ObjectList)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` has changed. |

### retainAll

Cmn

```
fun retainAll(elements: Sequence<E>): Boolean
```

Keeps only `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#retainAll(kotlin.sequences.Sequence)` in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` and removes all other values.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` has changed. |

### set

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun set(index: @IntRange(from = 0) Int, element: E): E
```

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

| Returns |
|---|---|
| `E` | the previous value set at `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#set(kotlin.Int,kotlin.Any)` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#set(kotlin.Int,kotlin.Any)` isn't between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#lastIndex()`, inclusive |

### sortBy

Cmn

```
inline fun <R : Comparable<R>> sortBy(crossinline selector: (element) -> R?): Unit
```

Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using values produced by `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortBy(kotlin.Function1)` in ascending order.

### sortByDescending

Cmn

```
inline fun <R : Comparable<R>> sortByDescending(crossinline selector: (element) -> R?): Unit
```

Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using values produced by `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortByDescending(kotlin.Function1)` in descending order.

### sortWith

Cmn

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

Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortWith(kotlin.Comparator)`.

### sortWith

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/collection#1.7.0)

```
inline fun sortWith(crossinline comparison: (a, b) -> Int): Unit
```

Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` in-place using the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#sortWith(kotlin.Function2)` function.

### trim

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun trim(minCapacity: Int = _size): Unit
```

Reduces the internal storage. If `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#capacity()` is greater than `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#trim(kotlin.Int)` and `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()`, the internal storage is reduced to the maximum of `https://developer.android.com/reference/kotlin/androidx/collection/ObjectList#size()` and `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#trim(kotlin.Int)`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#ensureCapacity(kotlin.Int)` |   |

## Public properties

### capacity

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
val capacity: Int
```

Returns the total number of elements that can be held before the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` must grow.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList#ensureCapacity(kotlin.Int)` |   |

## Extension functions

### MutableObjectList.sort

Cmn Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/ObjectList.kt+function:sort)

```
inline fun <E : Comparable<E>> MutableObjectList<E>.sort(): Unit
```

Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html` elements in-place in ascending order.

### MutableObjectList.sortDescending

Cmn Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/ObjectList.kt+function:sortDescending)

```
inline fun <E : Comparable<E>> MutableObjectList<E>.sortDescending(): Unit
```

Sorts elements in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableObjectList` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html` elements in-place in descending order.