# SimpleArrayMap

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

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  open class SimpleArrayMap<K : Any?, V : Any?>
  ```
Known direct subclasses [ArrayMap](https://developer.android.com/reference/kotlin/androidx/collection/ArrayMap)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/ArrayMap` | ArrayMap is a generic key-\>value mapping data structure that is designed to be more memory efficient than a traditional `https://developer.android.com/reference/java/util/HashMap.html`, this implementation is a version of the platform's `android.util.ArrayMap` that can be used on older versions of the platform. |

*** ** * ** ***

Base implementation of androidx.collection.ArrayMap that doesn't include any standard Java container API interoperability. These features are generally heavier-weight ways to interact with the container, so discouraged, but they can be useful to make it easier to use as a drop-in replacement for HashMap. If you don't need them, this class can be preferable since it doesn't bring in any of the implementation of those APIs, allowing that code to be stripped by ProGuard.

**NOTE:** Consider using `https://developer.android.com/reference/kotlin/androidx/collection/MutableScatterMap` instead of this class. `https://developer.android.com/reference/kotlin/androidx/collection/MutableScatterMap` also avoids creating a new object per entry but offers better performance characteristics. If a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html` interface is required, see `https://developer.android.com/reference/kotlin/androidx/collection/MutableScatterMap#asMap()`. If a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html` interface is required, see `https://developer.android.com/reference/kotlin/androidx/collection/MutableScatterMap#asMutableMap()`. A `https://developer.android.com/reference/kotlin/androidx/collection/MutableScatterMap` can also be passed as a `https://developer.android.com/reference/kotlin/androidx/collection/ScatterMap` to provide a read-only API surface.

## Summary

| ### Public constructors |
|---|---|
| `<K : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, V : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#SimpleArrayMap(kotlin.Int)(capacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Create a new `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` with a given initial capacity. | Cmn |
| `<K : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, V : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#SimpleArrayMap(androidx.collection.SimpleArrayMap)(map: https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap<K, V>?)` Create a new `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` with the mappings from the given `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#(androidx.collection.SimpleArrayMap)`. | Cmn |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#clear()()` Make the array map empty. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#containsKey(kotlin.Any)(key: K)` Check whether a key exists in the array. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#containsValue(kotlin.Any)(value: V)` Check whether a value exists in the array. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#ensureCapacity(kotlin.Int)(minimumCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Ensure the array map can hold at least `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#ensureCapacity(kotlin.Int)` items. | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` This implementation returns `false` if the object is not a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html` or `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap`, or if the maps have different sizes. | Cmn |
| `open operator V?` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#get(kotlin.Any)(key: K)` Retrieve a value from the array. | Cmn |
| `open V` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#getOrDefault(kotlin.Any,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, defaultValue: V)` Retrieve a value from the array, or `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#getOrDefault(kotlin.Any,kotlin.Any)` if there is no mapping for the key. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#indexOfKey(kotlin.Any)(key: K)` Returns the index of a key in the set. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#isEmpty()()` Return `true` if the array map contains no items. | Cmn |
| `open K` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#keyAt(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Return the key at the given index in the array. | Cmn |
| `open V?` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#put(kotlin.Any,kotlin.Any)(key: K, value: V)` Add a new value to the array map. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#putAll(androidx.collection.SimpleArrayMap)(map: https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap<K, V>)` Perform a `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#put(kotlin.Any,kotlin.Any)` of all key/value pairs in `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#putAll(androidx.collection.SimpleArrayMap)` | Cmn |
| `open V?` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#putIfAbsent(kotlin.Any,kotlin.Any)(key: K, value: V)` Add a new value to the array map only if the key does not already have a value or it is mapped to `null`. | Cmn |
| `open V?` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#remove(kotlin.Any)(key: K)` Remove an existing key from the array map. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#remove(kotlin.Any,kotlin.Any)(key: K, value: V)` Remove an existing key from the array map only if it is currently mapped to `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#remove(kotlin.Any,kotlin.Any)`. | Cmn |
| `open V` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#removeAt(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Remove the key/value mapping at the given index. | Cmn |
| `open V?` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any)(key: K, value: V)` Replace the mapping for `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any)` only if it is already mapped to a value. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any,kotlin.Any)(key: K, oldValue: V, newValue: V)` Replace the mapping for `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any,kotlin.Any)` only if it is already mapped to `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any,kotlin.Any)`. | Cmn |
| `open V` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#setValueAt(kotlin.Int,kotlin.Any)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: V)` Set the value at a given index in the array. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()()` Return the number of items in this array map. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#toString()()` Returns a string representation of the object. | Cmn |
| `open V` | `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#valueAt(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Return the value at the given index in the array. | Cmn |

## Public constructors

### SimpleArrayMap

Cmn

```
<K : Any?, V : Any?> SimpleArrayMap(capacity: Int = 0)
```

Create a new `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` with a given initial capacity. The default capacity of an array map is 0, and will grow once items are added to it.

### SimpleArrayMap

Cmn

```
<K : Any?, V : Any?> SimpleArrayMap(map: SimpleArrayMap<K, V>?)
```

Create a new `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` with the mappings from the given `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#(androidx.collection.SimpleArrayMap)`.

## Public functions

### clear

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

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

Make the array map empty. All storage is released.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-concurrent-modification-exception/index.html` | if it was detected that this `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` was written to while this operation was running. |

### containsKey

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

```
open fun containsKey(key: K): Boolean
```

Check whether a key exists in the array.

| Parameters |
|---|---|
| `key: K` | The key to search for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Returns `true` if the key exists, else `false`. |

### containsValue

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

```
open fun containsValue(value: V): Boolean
```

Check whether a value exists in the array. This requires a linear search through the entire array.

| Parameters |
|---|---|
| `value: V` | The value to search for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Returns `true` if the value exists, else `false`. |

### ensureCapacity

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

```
open fun ensureCapacity(minimumCapacity: Int): Unit
```

Ensure the array map can hold at least `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#ensureCapacity(kotlin.Int)` items.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-concurrent-modification-exception/index.html` | if it was detected that this `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` was written to while this operation was running. |

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

This implementation returns `false` if the object is not a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html` or `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap`, or if the maps have different sizes. Otherwise, for each key in this map, values of both maps are compared. If the values for any key are not equal, the method returns false, otherwise it returns `true`.

### get

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

```
open operator fun get(key: K): V?
```

Retrieve a value from the array.

| Parameters |
|---|---|
| `key: K` | The key of the value to retrieve. |

| Returns |
|---|---|
| `V?` | Returns the value associated with the given key, or `null` if there is no such key. |

### getOrDefault

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

```
open fun getOrDefault(key: Any?, defaultValue: V): V
```

Retrieve a value from the array, or `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#getOrDefault(kotlin.Any,kotlin.Any)` if there is no mapping for the key.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The key of the value to retrieve. |
| `defaultValue: V` | The default mapping of the key |

| Returns |
|---|---|
| `V` | Returns the value associated with the given key, or `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#getOrDefault(kotlin.Any,kotlin.Any)` if there is no mapping for the key. |

### hashCode

Cmn

```
open fun hashCode(): Int
```

### indexOfKey

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

```
open fun indexOfKey(key: K): Int
```

Returns the index of a key in the set.

| Parameters |
|---|---|
| `key: K` | The key to search for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Returns the index of the key if it exists, else a negative integer. |

### isEmpty

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

```
open fun isEmpty(): Boolean
```

Return `true` if the array map contains no items.

### keyAt

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

```
open fun keyAt(index: Int): K
```

Return the key at the given index in the array.

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The desired index, must be between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 (inclusive). |

| Returns |
|---|---|
| `K` | Returns the key stored at the given index. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#keyAt(kotlin.Int)` is not between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 |

### put

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

```
open fun put(key: K, value: V): V?
```

Add a new value to the array map.

| Parameters |
|---|---|
| `key: K` | The key under which to store the value. If this key already exists in the array, its value will be replaced. |
| `value: V` | The value to store for the given key. |

| Returns |
|---|---|
| `V?` | Returns the old value that was stored for the given key, or `null` if there was no such key. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-concurrent-modification-exception/index.html` | if it was detected that this `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` was written to while this operation was running. |

### putAll

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

```
open fun putAll(map: SimpleArrayMap<K, V>): Unit
```

Perform a `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#put(kotlin.Any,kotlin.Any)` of all key/value pairs in `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#putAll(androidx.collection.SimpleArrayMap)`

| Parameters |
|---|---|
| `map: https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap<K, V>` | The array whose contents are to be retrieved. |

### putIfAbsent

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

```
open fun putIfAbsent(key: K, value: V): V?
```

Add a new value to the array map only if the key does not already have a value or it is mapped to `null`.

| Parameters |
|---|---|
| `key: K` | The key under which to store the value. |
| `value: V` | The value to store for the given key. |

| Returns |
|---|---|
| `V?` | Returns the value that was stored for the given key, or `null` if there was no such key. |

### remove

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

```
open fun remove(key: K): V?
```

Remove an existing key from the array map.

| Parameters |
|---|---|
| `key: K` | The key of the mapping to remove. |

| Returns |
|---|---|
| `V?` | Returns the value that was stored under the key, or `null` if there was no such key. |

### remove

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

```
open fun remove(key: K, value: V): Boolean
```

Remove an existing key from the array map only if it is currently mapped to `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#remove(kotlin.Any,kotlin.Any)`.

| Parameters |
|---|---|
| `key: K` | The key of the mapping to remove. |
| `value: V` | The value expected to be mapped to the key. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Returns `true` if the mapping was removed. |

### removeAt

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

```
open fun removeAt(index: Int): V
```

Remove the key/value mapping at the given index.

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The desired index, must be between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 (inclusive). |

| Returns |
|---|---|
| `V` | Returns the value that was stored at this index. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-concurrent-modification-exception/index.html` | if it was detected that this `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap` was written to while this operation was running. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#removeAt(kotlin.Int)` is not between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 |

### replace

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

```
open fun replace(key: K, value: V): V?
```

Replace the mapping for `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any)` only if it is already mapped to a value.

| Parameters |
|---|---|
| `key: K` | The key of the mapping to replace. |
| `value: V` | The value to store for the given key. |

| Returns |
|---|---|
| `V?` | Returns the previous mapped value or `null`. |

### replace

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

```
open fun replace(key: K, oldValue: V, newValue: V): Boolean
```

Replace the mapping for `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any,kotlin.Any)` only if it is already mapped to `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#replace(kotlin.Any,kotlin.Any,kotlin.Any)`.

| Parameters |
|---|---|
| `key: K` | The key of the mapping to replace. |
| `oldValue: V` | The value expected to be mapped to the key. |
| `newValue: V` | The value to store for the given key. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Returns `true` if the value was replaced. |

### setValueAt

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

```
open fun setValueAt(index: Int, value: V): V
```

Set the value at a given index in the array.

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The desired index, must be between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 (inclusive). |
| `value: V` | The new value to store at this index. |

| Returns |
|---|---|
| `V` | Returns the previous value at the given index. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#setValueAt(kotlin.Int,kotlin.Any)` is not between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 |

### size

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

```
open fun size(): Int
```

Return the number of items in this array map.

### toString

Cmn

```
open fun toString(): String
```

Returns a string representation of the object.

This implementation composes a string by iterating over its mappings. If this map contains itself as a key or a value, the string "(this Map)" will appear in its place.

### valueAt

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

```
open fun valueAt(index: Int): V
```

Return the value at the given index in the array.

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The desired index, must be between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 (inclusive). |

| Returns |
|---|---|
| `V` | Returns the value stored at the given index. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#valueAt(kotlin.Int)` is not between 0 and `https://developer.android.com/reference/kotlin/androidx/collection/SimpleArrayMap#size()`-1 |