ScatterMapKt

Added in 1.4.0

public final class ScatterMapKt


Summary

Public methods

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

Returns an empty, read-only ScatterMap.

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

Returns a new MutableScatterMap.

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 MutableScatterMap with the specified contents, given as a list of pairs where the first component is the key and the second is the value.

Public methods

emptyScatterMap

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

Returns an empty, read-only ScatterMap.

mutableScatterMapOf

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

Returns a new MutableScatterMap.

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 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.