ArrayMapKt

public final class ArrayMapKt


Summary

Public methods

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

Returns an empty new ArrayMap.

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

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

Returns an empty new ArrayMap.

arrayMapOf

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

Returns a new 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.