LongFloatMapKt

Added in 1.4.0

public final class LongFloatMapKt


Summary

Public methods

static final @NonNull LongFloatMap

Builds a new LongFloatMap by populating a MutableLongFloatMap using the given builderAction.

static final @NonNull LongFloatMap
buildLongFloatMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongFloatMapUnit> builderAction
)

Builds a new LongFloatMap by populating a MutableLongFloatMap using the given builderAction.

static final @NonNull LongFloatMap

Returns an empty, read-only LongFloatMap.

static final @NonNull LongFloatMap

Returns a new MutableLongFloatMap.

static final @NonNull LongFloatMap
longFloatMapOf(long key1, float value1)

Returns a new LongFloatMap with key1 associated with value1.

static final @NonNull LongFloatMap
longFloatMapOf(long key1, float value1, long key2, float value2)

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

static final @NonNull LongFloatMap
longFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3
)

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

static final @NonNull LongFloatMap
longFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4
)

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

static final @NonNull LongFloatMap
longFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4,
    long key5,
    float value5
)

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

static final @NonNull MutableLongFloatMap

Returns a new MutableLongFloatMap.

static final @NonNull MutableLongFloatMap
mutableLongFloatMapOf(long key1, float value1)

Returns a new MutableLongFloatMap with key1 associated with value1.

static final @NonNull MutableLongFloatMap
mutableLongFloatMapOf(long key1, float value1, long key2, float value2)

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

static final @NonNull MutableLongFloatMap
mutableLongFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3
)

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

static final @NonNull MutableLongFloatMap
mutableLongFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4
)

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

static final @NonNull MutableLongFloatMap
mutableLongFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4,
    long key5,
    float value5
)

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

Public methods

buildLongFloatMap

public static final @NonNull LongFloatMap buildLongFloatMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongFloatMapUnit> builderAction
)

Builds a new LongFloatMap by populating a MutableLongFloatMap 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 MutableLongFloatMapUnit> builderAction

Lambda in which the MutableLongFloatMap can be populated.

buildLongFloatMap

public static final @NonNull LongFloatMap buildLongFloatMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableLongFloatMapUnit> builderAction
)

Builds a new LongFloatMap by populating a MutableLongFloatMap 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 MutableLongFloatMapUnit> builderAction

Lambda in which the MutableLongFloatMap can be populated.

emptyLongFloatMap

public static final @NonNull LongFloatMap emptyLongFloatMap()

Returns an empty, read-only LongFloatMap.

longFloatMapOf

public static final @NonNull LongFloatMap longFloatMapOf()

Returns a new MutableLongFloatMap.

longFloatMapOf

public static final @NonNull LongFloatMap longFloatMapOf(long key1, float value1)

Returns a new LongFloatMap with key1 associated with value1.

longFloatMapOf

public static final @NonNull LongFloatMap longFloatMapOf(long key1, float value1, long key2, float value2)

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

longFloatMapOf

public static final @NonNull LongFloatMap longFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3
)

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

longFloatMapOf

public static final @NonNull LongFloatMap longFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4
)

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

longFloatMapOf

public static final @NonNull LongFloatMap longFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4,
    long key5,
    float value5
)

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

mutableLongFloatMapOf

public static final @NonNull MutableLongFloatMap mutableLongFloatMapOf()

Returns a new MutableLongFloatMap.

mutableLongFloatMapOf

public static final @NonNull MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1)

Returns a new MutableLongFloatMap with key1 associated with value1.

mutableLongFloatMapOf

public static final @NonNull MutableLongFloatMap mutableLongFloatMapOf(long key1, float value1, long key2, float value2)

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

mutableLongFloatMapOf

public static final @NonNull MutableLongFloatMap mutableLongFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3
)

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

mutableLongFloatMapOf

public static final @NonNull MutableLongFloatMap mutableLongFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4
)

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

mutableLongFloatMapOf

public static final @NonNull MutableLongFloatMap mutableLongFloatMapOf(
    long key1,
    float value1,
    long key2,
    float value2,
    long key3,
    float value3,
    long key4,
    float value4,
    long key5,
    float value5
)

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