IntIntMapKt

Added in 1.4.0

public final class IntIntMapKt


Summary

Public methods

static final @NonNull IntIntMap

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

static final @NonNull IntIntMap
buildIntIntMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntIntMapUnit> builderAction
)

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

static final @NonNull IntIntMap

Returns an empty, read-only IntIntMap.

static final @NonNull IntIntMap

Returns a new MutableIntIntMap.

static final @NonNull IntIntMap
intIntMapOf(int key1, int value1)

Returns a new IntIntMap with key1 associated with value1.

static final @NonNull IntIntMap
intIntMapOf(int key1, int value1, int key2, int value2)

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

static final @NonNull IntIntMap
intIntMapOf(
    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.

static final @NonNull IntIntMap
intIntMapOf(
    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.

static final @NonNull IntIntMap
intIntMapOf(
    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.

static final @NonNull MutableIntIntMap

Returns a new MutableIntIntMap.

static final @NonNull MutableIntIntMap
mutableIntIntMapOf(int key1, int value1)

Returns a new MutableIntIntMap with key1 associated with value1.

static final @NonNull MutableIntIntMap
mutableIntIntMapOf(int key1, int value1, int key2, int value2)

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

static final @NonNull MutableIntIntMap
mutableIntIntMapOf(
    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.

static final @NonNull MutableIntIntMap
mutableIntIntMapOf(
    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.

static final @NonNull MutableIntIntMap
mutableIntIntMapOf(
    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.

Public methods

buildIntIntMap

public static final @NonNull IntIntMap buildIntIntMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntIntMapUnit> 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
@ExtensionFunctionType @NonNull Function1<@NonNull MutableIntIntMapUnit> builderAction

Lambda in which the MutableIntIntMap can be populated.

buildIntIntMap

public static final @NonNull IntIntMap buildIntIntMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntIntMapUnit> 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
int initialCapacity

Hint for the expected number of pairs added in the builderAction.

@ExtensionFunctionType @NonNull Function1<@NonNull MutableIntIntMapUnit> builderAction

Lambda in which the MutableIntIntMap can be populated.

emptyIntIntMap

public static final @NonNull IntIntMap emptyIntIntMap()

Returns an empty, read-only IntIntMap.

intIntMapOf

public static final @NonNull IntIntMap intIntMapOf()

Returns a new MutableIntIntMap.

intIntMapOf

public static final @NonNull IntIntMap intIntMapOf(int key1, int value1)

Returns a new IntIntMap with key1 associated with value1.

intIntMapOf

public static final @NonNull IntIntMap intIntMapOf(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 IntIntMap intIntMapOf(
    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 IntIntMap intIntMapOf(
    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 IntIntMap intIntMapOf(
    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 MutableIntIntMap mutableIntIntMapOf()

Returns a new MutableIntIntMap.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMap mutableIntIntMapOf(int key1, int value1)

Returns a new MutableIntIntMap with key1 associated with value1.

mutableIntIntMapOf

public static final @NonNull MutableIntIntMap mutableIntIntMapOf(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 MutableIntIntMap mutableIntIntMapOf(
    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 MutableIntIntMap mutableIntIntMapOf(
    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 MutableIntIntMap mutableIntIntMapOf(
    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.