# ArrayMapKt

Added in 1.3.0

*** ** * ** ***


```
public final class ArrayMapKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ArrayMap<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V>` | `<K extends https://developer.android.com/reference/java/lang/Object.html, V extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ArrayMapKt#arrayMapOf()()` Returns an empty new `https://developer.android.com/reference/androidx/collection/ArrayMap`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ArrayMap<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V>` | `<K extends https://developer.android.com/reference/java/lang/Object.html, V extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ArrayMapKt#arrayMapOf(kotlin.Array)( @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V>... pairs )` Returns a new `https://developer.android.com/reference/androidx/collection/ArrayMap` with the specified contents, given as a list of pairs where the first component is the key and the second component is the value. |

## Public methods

### arrayMapOf

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/ArrayMap.jvm.kt+function:arrayMapOf) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/collection#1.3.0)

```
public static final @NonNull ArrayMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> arrayMapOf()
```

Returns an empty new `https://developer.android.com/reference/androidx/collection/ArrayMap`. **NOTE:** Consider using `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterMapOf()` instead. `https://developer.android.com/reference/androidx/collection/MutableScatterMap` also avoids creating a new object per entry but offers better performance characteristics.

### arrayMapOf

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

```
public static final @NonNull ArrayMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> arrayMapOf(
    @NonNull Pair<@NonNull K, @NonNull V>... pairs
)
```

Returns a new `https://developer.android.com/reference/androidx/collection/ArrayMap` with the specified contents, given as a list of pairs where the first component is the key and the second component is the value.

If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.

**NOTE:** Consider using `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterMapOf()` instead. `https://developer.android.com/reference/androidx/collection/MutableScatterMap` also avoids creating a new object per entry but offers better performance characteristics.