# ScatterMapKt

Added in 1.4.0

*** ** * ** ***


```
public final class ScatterMapKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterMap<@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/ScatterMapKt#emptyScatterMap()()` Returns an empty, read-only `https://developer.android.com/reference/androidx/collection/ScatterMap`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterMap<@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/ScatterMapKt#mutableScatterMapOf()()` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterMap<@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/ScatterMapKt#mutableScatterMapOf(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/MutableScatterMap` with the specified contents, given as a list of pairs where the first component is the key and the second is the value. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterMap<@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/ScatterMapKt#(kotlin.collections.Map).toMutableScatterMap()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V> receiver )` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap` with the specified mappings. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterMap<@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/ScatterMapKt#(androidx.collection.ScatterMap).toMutableScatterMap()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterMap<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V> receiver )` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap` with the specified mappings. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterMap<@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/ScatterMapKt#(kotlin.collections.Map).toScatterMap()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V> receiver )` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterMap` with the specified mappings. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterMap<@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/ScatterMapKt#(androidx.collection.ScatterMap).toScatterMap()( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterMap<@https://developer.android.com/reference/androidx/annotation/NonNull K, @https://developer.android.com/reference/androidx/annotation/NonNull V> receiver )` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterMap` with the specified mappings. |

## Public methods

### emptyScatterMap

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

```
public static final @NonNull ScatterMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> emptyScatterMap()
```

Returns an empty, read-only `https://developer.android.com/reference/androidx/collection/ScatterMap`.

### mutableScatterMapOf

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

```
public static final @NonNull MutableScatterMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> mutableScatterMapOf()
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap`.

### mutableScatterMapOf

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

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

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap` with the specified contents, given as a list of pairs where the first component is the key and the second is the value. If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.

### toMutableScatterMap

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

```
public static final @NonNull MutableScatterMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> toMutableScatterMap(
    @NonNull Map<@NonNull K, @NonNull V> receiver
)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap` with the specified mappings.

The `https://developer.android.com/reference/androidx/collection/MutableScatterMap` is created with an initial capacity sufficient to hold the mappings in the specified `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html`.

### toMutableScatterMap

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

```
public static final @NonNull MutableScatterMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> toMutableScatterMap(
    @NonNull ScatterMap<@NonNull K, @NonNull V> receiver
)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterMap` with the specified mappings.

The `https://developer.android.com/reference/androidx/collection/MutableScatterMap` is created with an initial capacity sufficient to hold the mappings in the specified `https://developer.android.com/reference/androidx/collection/ScatterMap`.

### toScatterMap

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

```
public static final @NonNull ScatterMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> toScatterMap(
    @NonNull Map<@NonNull K, @NonNull V> receiver
)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterMap` with the specified mappings.

### toScatterMap

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

```
public static final @NonNull ScatterMap<@NonNull K, @NonNull V> <K extends Object, V extends Object> toScatterMap(
    @NonNull ScatterMap<@NonNull K, @NonNull V> receiver
)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterMap` with the specified mappings.