FloatIntMapKt

Added in 1.4.0

public final class FloatIntMapKt


Summary

Public methods

static final @NonNull FloatIntMap

Builds a new FloatIntMap by populating a MutableFloatIntMap using the given builderAction.

static final @NonNull FloatIntMap
buildFloatIntMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableFloatIntMapUnit> builderAction
)

Builds a new FloatIntMap by populating a MutableFloatIntMap using the given builderAction.

static final @NonNull FloatIntMap

Returns an empty, read-only FloatIntMap.

static final @NonNull FloatIntMap

Returns a new MutableFloatIntMap.

static final @NonNull FloatIntMap
floatIntMapOf(float key1, int value1)

Returns a new FloatIntMap with key1 associated with value1.

static final @NonNull FloatIntMap
floatIntMapOf(float key1, int value1, float key2, int value2)

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

static final @NonNull FloatIntMap
floatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3
)

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

static final @NonNull FloatIntMap
floatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4
)

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

static final @NonNull FloatIntMap
floatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4,
    float key5,
    int value5
)

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

static final @NonNull MutableFloatIntMap

Returns a new MutableFloatIntMap.

static final @NonNull MutableFloatIntMap
mutableFloatIntMapOf(float key1, int value1)

Returns a new MutableFloatIntMap with key1 associated with value1.

static final @NonNull MutableFloatIntMap
mutableFloatIntMapOf(float key1, int value1, float key2, int value2)

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

static final @NonNull MutableFloatIntMap
mutableFloatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3
)

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

static final @NonNull MutableFloatIntMap
mutableFloatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4
)

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

static final @NonNull MutableFloatIntMap
mutableFloatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4,
    float key5,
    int value5
)

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

Public methods

buildFloatIntMap

public static final @NonNull FloatIntMap buildFloatIntMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableFloatIntMapUnit> builderAction
)

Builds a new FloatIntMap by populating a MutableFloatIntMap 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 MutableFloatIntMapUnit> builderAction

Lambda in which the MutableFloatIntMap can be populated.

buildFloatIntMap

public static final @NonNull FloatIntMap buildFloatIntMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableFloatIntMapUnit> builderAction
)

Builds a new FloatIntMap by populating a MutableFloatIntMap 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 MutableFloatIntMapUnit> builderAction

Lambda in which the MutableFloatIntMap can be populated.

emptyFloatIntMap

public static final @NonNull FloatIntMap emptyFloatIntMap()

Returns an empty, read-only FloatIntMap.

floatIntMapOf

public static final @NonNull FloatIntMap floatIntMapOf()

Returns a new MutableFloatIntMap.

floatIntMapOf

public static final @NonNull FloatIntMap floatIntMapOf(float key1, int value1)

Returns a new FloatIntMap with key1 associated with value1.

floatIntMapOf

public static final @NonNull FloatIntMap floatIntMapOf(float key1, int value1, float key2, int value2)

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

floatIntMapOf

public static final @NonNull FloatIntMap floatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3
)

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

floatIntMapOf

public static final @NonNull FloatIntMap floatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4
)

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

floatIntMapOf

public static final @NonNull FloatIntMap floatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4,
    float key5,
    int value5
)

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

mutableFloatIntMapOf

public static final @NonNull MutableFloatIntMap mutableFloatIntMapOf()

Returns a new MutableFloatIntMap.

mutableFloatIntMapOf

public static final @NonNull MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1)

Returns a new MutableFloatIntMap with key1 associated with value1.

mutableFloatIntMapOf

public static final @NonNull MutableFloatIntMap mutableFloatIntMapOf(float key1, int value1, float key2, int value2)

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

mutableFloatIntMapOf

public static final @NonNull MutableFloatIntMap mutableFloatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3
)

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

mutableFloatIntMapOf

public static final @NonNull MutableFloatIntMap mutableFloatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4
)

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

mutableFloatIntMapOf

public static final @NonNull MutableFloatIntMap mutableFloatIntMapOf(
    float key1,
    int value1,
    float key2,
    int value2,
    float key3,
    int value3,
    float key4,
    int value4,
    float key5,
    int value5
)

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