IntIntMapKt

Added in 1.4.0

public final class IntIntMapKt

Summary

Public methods

buildIntIntMap

public static final @NonNull IntIntMapbuildIntIntMap(
 @NonNull Function1<@NonNull MutableIntIntMap, Unit> builderAction
)

Builds a new IntIntMap by populating a MutableIntIntMap using the given builderAction.

The instance passed as a receiver to the builderAction is valid only inside that function. Using it outside of the function produces an unspecified behavior.

Parameters
@NonNull Function1<@NonNull MutableIntIntMap, Unit> builderAction

Lambda in which the MutableIntIntMap can be populated.

buildIntIntMap

public static final @NonNull IntIntMapbuildIntIntMap(
 int initialCapacity,
 @NonNull Function1<@NonNull MutableIntIntMap, Unit> builderAction
)

Builds a new IntIntMap by populating a MutableIntIntMap using the given builderAction.

The instance passed as a receiver to the builderAction is valid only inside that function. Using it outside of the function produces an unspecified behavior.

emptyIntIntMap

public static final @NonNull IntIntMapemptyIntIntMap()

Returns an empty, read-only IntIntMap.

intIntMapOf

public static final @NonNull IntIntMapintIntMapOf()

Returns a new MutableIntIntMap.

intIntMapOf

public static final @NonNull IntIntMapintIntMapOf(int key1, int value1)

Returns a new IntIntMap with key1 associated with value1.

intIntMapOf

public static final @NonNull IntIntMapintIntMapOf(int key1, int value1, int key2, int value2)

Returns a new IntIntMap with key1, and key2 associated with value1, and value2, respectively.

intIntMapOf

public static final @NonNull IntIntMapintIntMapOf(
 int key1,
 int value1,
 int key2,
 int value2,
 int key3,
 int value3
)

Returns a new IntIntMap with key1, key2, and key3 associated with value1, value2, and value3, respectively.

intIntMapOf

public static final @NonNull IntIntMapintIntMapOf(
 int key1,
 int value1,
 int key2,
 int value2,
 int key3,
 int value3,
 int key4,
 int value4
)

Returns a new IntIntMap with key1, key2, key3, and key4 associated with value1, value2, value3, and value4, respectively.

intIntMapOf

public static final @NonNull IntIntMapintIntMapOf(
 int key1,
 int value1,
 int key2,
 int value2,
 int key3,
 int value3,
 int key4,
 int value4,
 int key5,
 int value5
)

Returns a new IntIntMap with key1, key2, key3, key4, and key5 associated with value1, value2, value3, value4, and value5, respectively.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMapmutableIntIntMapOf()

Returns a new MutableIntIntMap.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMapmutableIntIntMapOf(int key1, int value1)

Returns a new MutableIntIntMap with key1 associated with value1.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMapmutableIntIntMapOf(int key1, int value1, int key2, int value2)

Returns a new MutableIntIntMap with key1, and key2 associated with value1, and value2, respectively.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMapmutableIntIntMapOf(
 int key1,
 int value1,
 int key2,
 int value2,
 int key3,
 int value3
)

Returns a new MutableIntIntMap with key1, key2, and key3 associated with value1, value2, and value3, respectively.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMapmutableIntIntMapOf(
 int key1,
 int value1,
 int key2,
 int value2,
 int key3,
 int value3,
 int key4,
 int value4
)

Returns a new MutableIntIntMap with key1, key2, key3, and key4 associated with value1, value2, value3, and value4, respectively.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMapmutableIntIntMapOf(
 int key1,
 int value1,
 int key2,
 int value2,
 int key3,
 int value3,
 int key4,
 int value4,
 int key5,
 int value5
)

Returns a new MutableIntIntMap with key1, key2, key3, key4, and key5 associated with value1, value2, value3, value4, and value5, respectively.