LongObjectMapKt

Added in 1.4.0

public final class LongObjectMapKt


Summary

Public methods

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> buildLongObjectMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new LongObjectMap by populating a MutableLongObjectMap using the given builderAction.

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> buildLongObjectMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new LongObjectMap by populating a MutableLongObjectMap using the given builderAction.

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> emptyLongObjectMap()

Returns an empty, read-only LongObjectMap.

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> longObjectMapOf()

Returns an empty, read-only LongObjectMap.

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> longObjectMapOf(long key1, @NonNull V value1)

Returns a new LongObjectMap with key1 associated with value1.

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2
)

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

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3
)

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

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4
)

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

static final @NonNull LongObjectMap<@NonNull V>
<V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4,
    long key5,
    @NonNull V value5
)

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

static final @NonNull MutableLongObjectMap<@NonNull V>

Returns a new MutableLongObjectMap.

static final @NonNull MutableLongObjectMap<@NonNull V>
<V extends Object> mutableLongObjectMapOf(long key1, @NonNull V value1)

Returns a new MutableLongObjectMap with key1 associated with value1.

static final @NonNull MutableLongObjectMap<@NonNull V>
<V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2
)

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

static final @NonNull MutableLongObjectMap<@NonNull V>
<V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3
)

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

static final @NonNull MutableLongObjectMap<@NonNull V>
<V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4
)

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

static final @NonNull MutableLongObjectMap<@NonNull V>
<V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4,
    long key5,
    @NonNull V value5
)

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

Public methods

buildLongObjectMap

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> buildLongObjectMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new LongObjectMap by populating a MutableLongObjectMap 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 MutableLongObjectMap<@NonNull V>, Unit> builderAction

Lambda in which the MutableLongObjectMap can be populated.

buildLongObjectMap

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> buildLongObjectMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new LongObjectMap by populating a MutableLongObjectMap 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 MutableLongObjectMap<@NonNull V>, Unit> builderAction

Lambda in which the MutableLongObjectMap can be populated.

emptyLongObjectMap

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> emptyLongObjectMap()

Returns an empty, read-only LongObjectMap.

longObjectMapOf

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> longObjectMapOf()

Returns an empty, read-only LongObjectMap.

longObjectMapOf

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> longObjectMapOf(long key1, @NonNull V value1)

Returns a new LongObjectMap with key1 associated with value1.

longObjectMapOf

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2
)

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

longObjectMapOf

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3
)

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

longObjectMapOf

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4
)

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

longObjectMapOf

public static final @NonNull LongObjectMap<@NonNull V> <V extends Object> longObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4,
    long key5,
    @NonNull V value5
)

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

mutableLongObjectMapOf

public static final @NonNull MutableLongObjectMap<@NonNull V> <V extends Object> mutableLongObjectMapOf()

Returns a new MutableLongObjectMap.

mutableLongObjectMapOf

public static final @NonNull MutableLongObjectMap<@NonNull V> <V extends Object> mutableLongObjectMapOf(long key1, @NonNull V value1)

Returns a new MutableLongObjectMap with key1 associated with value1.

mutableLongObjectMapOf

public static final @NonNull MutableLongObjectMap<@NonNull V> <V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2
)

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

mutableLongObjectMapOf

public static final @NonNull MutableLongObjectMap<@NonNull V> <V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3
)

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

mutableLongObjectMapOf

public static final @NonNull MutableLongObjectMap<@NonNull V> <V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4
)

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

mutableLongObjectMapOf

public static final @NonNull MutableLongObjectMap<@NonNull V> <V extends Object> mutableLongObjectMapOf(
    long key1,
    @NonNull V value1,
    long key2,
    @NonNull V value2,
    long key3,
    @NonNull V value3,
    long key4,
    @NonNull V value4,
    long key5,
    @NonNull V value5
)

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