IntLongMapKt

Added in 1.4.0

public final class IntLongMapKt


Summary

Public methods

static final @NonNull IntLongMap

Builds a new IntLongMap by populating a MutableIntLongMap using the given builderAction.

static final @NonNull IntLongMap
buildIntLongMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntLongMapUnit> builderAction
)

Builds a new IntLongMap by populating a MutableIntLongMap using the given builderAction.

static final @NonNull IntLongMap

Returns an empty, read-only IntLongMap.

static final @NonNull IntLongMap

Returns a new MutableIntLongMap.

static final @NonNull IntLongMap
intLongMapOf(int key1, long value1)

Returns a new IntLongMap with key1 associated with value1.

static final @NonNull IntLongMap
intLongMapOf(int key1, long value1, int key2, long value2)

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

static final @NonNull IntLongMap
intLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3
)

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

static final @NonNull IntLongMap
intLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3,
    int key4,
    long value4
)

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

static final @NonNull IntLongMap
intLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3,
    int key4,
    long value4,
    int key5,
    long value5
)

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

static final @NonNull MutableIntLongMap

Returns a new MutableIntLongMap.

static final @NonNull MutableIntLongMap
mutableIntLongMapOf(int key1, long value1)

Returns a new MutableIntLongMap with key1 associated with value1.

static final @NonNull MutableIntLongMap
mutableIntLongMapOf(int key1, long value1, int key2, long value2)

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

static final @NonNull MutableIntLongMap
mutableIntLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3
)

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

static final @NonNull MutableIntLongMap
mutableIntLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3,
    int key4,
    long value4
)

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

static final @NonNull MutableIntLongMap
mutableIntLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3,
    int key4,
    long value4,
    int key5,
    long value5
)

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

Public methods

buildIntLongMap

public static final @NonNull IntLongMap buildIntLongMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntLongMapUnit> builderAction
)

Builds a new IntLongMap by populating a MutableIntLongMap 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 MutableIntLongMapUnit> builderAction

Lambda in which the MutableIntLongMap can be populated.

buildIntLongMap

public static final @NonNull IntLongMap buildIntLongMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntLongMapUnit> builderAction
)

Builds a new IntLongMap by populating a MutableIntLongMap 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 MutableIntLongMapUnit> builderAction

Lambda in which the MutableIntLongMap can be populated.

emptyIntLongMap

public static final @NonNull IntLongMap emptyIntLongMap()

Returns an empty, read-only IntLongMap.

intLongMapOf

public static final @NonNull IntLongMap intLongMapOf()

Returns a new MutableIntLongMap.

intLongMapOf

public static final @NonNull IntLongMap intLongMapOf(int key1, long value1)

Returns a new IntLongMap with key1 associated with value1.

intLongMapOf

public static final @NonNull IntLongMap intLongMapOf(int key1, long value1, int key2, long value2)

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

intLongMapOf

public static final @NonNull IntLongMap intLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3
)

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

intLongMapOf

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

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

intLongMapOf

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

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

mutableIntLongMapOf

public static final @NonNull MutableIntLongMap mutableIntLongMapOf()

Returns a new MutableIntLongMap.

mutableIntLongMapOf

public static final @NonNull MutableIntLongMap mutableIntLongMapOf(int key1, long value1)

Returns a new MutableIntLongMap with key1 associated with value1.

mutableIntLongMapOf

public static final @NonNull MutableIntLongMap mutableIntLongMapOf(int key1, long value1, int key2, long value2)

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

mutableIntLongMapOf

public static final @NonNull MutableIntLongMap mutableIntLongMapOf(
    int key1,
    long value1,
    int key2,
    long value2,
    int key3,
    long value3
)

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

mutableIntLongMapOf

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

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

mutableIntLongMapOf

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

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