LongLongMapKt

Added in 1.4.0

public final class LongLongMapKt


Summary

Public methods

static final @NonNull LongLongMap

Builds a new LongLongMap by populating a MutableLongLongMap using the given builderAction.

static final @NonNull LongLongMap
buildLongLongMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongLongMapUnit> builderAction
)

Builds a new LongLongMap by populating a MutableLongLongMap using the given builderAction.

static final @NonNull LongLongMap

Returns an empty, read-only LongLongMap.

static final @NonNull LongLongMap

Returns a new MutableLongLongMap.

static final @NonNull LongLongMap
longLongMapOf(long key1, long value1)

Returns a new LongLongMap with key1 associated with value1.

static final @NonNull LongLongMap
longLongMapOf(long key1, long value1, long key2, long value2)

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

static final @NonNull LongLongMap
longLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3
)

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

static final @NonNull LongLongMap
longLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4
)

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

static final @NonNull LongLongMap
longLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4,
    long key5,
    long value5
)

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

static final @NonNull MutableLongLongMap

Returns a new MutableLongLongMap.

static final @NonNull MutableLongLongMap
mutableLongLongMapOf(long key1, long value1)

Returns a new MutableLongLongMap with key1 associated with value1.

static final @NonNull MutableLongLongMap
mutableLongLongMapOf(long key1, long value1, long key2, long value2)

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

static final @NonNull MutableLongLongMap
mutableLongLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3
)

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

static final @NonNull MutableLongLongMap
mutableLongLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4
)

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

static final @NonNull MutableLongLongMap
mutableLongLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4,
    long key5,
    long value5
)

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

Public methods

buildLongLongMap

public static final @NonNull LongLongMap buildLongLongMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongLongMapUnit> builderAction
)

Builds a new LongLongMap by populating a MutableLongLongMap 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 MutableLongLongMapUnit> builderAction

Lambda in which the MutableLongLongMap can be populated.

buildLongLongMap

public static final @NonNull LongLongMap buildLongLongMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongLongMapUnit> builderAction
)

Builds a new LongLongMap by populating a MutableLongLongMap 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 MutableLongLongMapUnit> builderAction

Lambda in which the MutableLongLongMap can be populated.

emptyLongLongMap

public static final @NonNull LongLongMap emptyLongLongMap()

Returns an empty, read-only LongLongMap.

longLongMapOf

public static final @NonNull LongLongMap longLongMapOf()

Returns a new MutableLongLongMap.

longLongMapOf

public static final @NonNull LongLongMap longLongMapOf(long key1, long value1)

Returns a new LongLongMap with key1 associated with value1.

longLongMapOf

public static final @NonNull LongLongMap longLongMapOf(long key1, long value1, long key2, long value2)

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

longLongMapOf

public static final @NonNull LongLongMap longLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3
)

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

longLongMapOf

public static final @NonNull LongLongMap longLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4
)

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

longLongMapOf

public static final @NonNull LongLongMap longLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4,
    long key5,
    long value5
)

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

mutableLongLongMapOf

public static final @NonNull MutableLongLongMap mutableLongLongMapOf()

Returns a new MutableLongLongMap.

mutableLongLongMapOf

public static final @NonNull MutableLongLongMap mutableLongLongMapOf(long key1, long value1)

Returns a new MutableLongLongMap with key1 associated with value1.

mutableLongLongMapOf

public static final @NonNull MutableLongLongMap mutableLongLongMapOf(long key1, long value1, long key2, long value2)

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

mutableLongLongMapOf

public static final @NonNull MutableLongLongMap mutableLongLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3
)

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

mutableLongLongMapOf

public static final @NonNull MutableLongLongMap mutableLongLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4
)

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

mutableLongLongMapOf

public static final @NonNull MutableLongLongMap mutableLongLongMapOf(
    long key1,
    long value1,
    long key2,
    long value2,
    long key3,
    long value3,
    long key4,
    long value4,
    long key5,
    long value5
)

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