IntFloatMapKt

Added in 1.4.0

public final class IntFloatMapKt


Summary

Public methods

static final @NonNull IntFloatMap

Builds a new IntFloatMap by populating a MutableIntFloatMap using the given builderAction.

static final @NonNull IntFloatMap
buildIntFloatMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntFloatMapUnit> builderAction
)

Builds a new IntFloatMap by populating a MutableIntFloatMap using the given builderAction.

static final @NonNull IntFloatMap

Returns an empty, read-only IntFloatMap.

static final @NonNull IntFloatMap

Returns a new MutableIntFloatMap.

static final @NonNull IntFloatMap
intFloatMapOf(int key1, float value1)

Returns a new IntFloatMap with key1 associated with value1.

static final @NonNull IntFloatMap
intFloatMapOf(int key1, float value1, int key2, float value2)

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

static final @NonNull IntFloatMap
intFloatMapOf(
    int key1,
    float value1,
    int key2,
    float value2,
    int key3,
    float value3
)

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

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

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

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

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

static final @NonNull MutableIntFloatMap

Returns a new MutableIntFloatMap.

static final @NonNull MutableIntFloatMap
mutableIntFloatMapOf(int key1, float value1)

Returns a new MutableIntFloatMap with key1 associated with value1.

static final @NonNull MutableIntFloatMap
mutableIntFloatMapOf(int key1, float value1, int key2, float value2)

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

static final @NonNull MutableIntFloatMap
mutableIntFloatMapOf(
    int key1,
    float value1,
    int key2,
    float value2,
    int key3,
    float value3
)

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

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

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

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

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

Public methods

buildIntFloatMap

public static final @NonNull IntFloatMap buildIntFloatMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntFloatMapUnit> builderAction
)

Builds a new IntFloatMap by populating a MutableIntFloatMap 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 MutableIntFloatMapUnit> builderAction

Lambda in which the MutableIntFloatMap can be populated.

buildIntFloatMap

public static final @NonNull IntFloatMap buildIntFloatMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntFloatMapUnit> builderAction
)

Builds a new IntFloatMap by populating a MutableIntFloatMap 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 MutableIntFloatMapUnit> builderAction

Lambda in which the MutableIntFloatMap can be populated.

emptyIntFloatMap

public static final @NonNull IntFloatMap emptyIntFloatMap()

Returns an empty, read-only IntFloatMap.

intFloatMapOf

public static final @NonNull IntFloatMap intFloatMapOf()

Returns a new MutableIntFloatMap.

intFloatMapOf

public static final @NonNull IntFloatMap intFloatMapOf(int key1, float value1)

Returns a new IntFloatMap with key1 associated with value1.

intFloatMapOf

public static final @NonNull IntFloatMap intFloatMapOf(int key1, float value1, int key2, float value2)

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

intFloatMapOf

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

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

intFloatMapOf

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

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

intFloatMapOf

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

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

mutableIntFloatMapOf

public static final @NonNull MutableIntFloatMap mutableIntFloatMapOf()

Returns a new MutableIntFloatMap.

mutableIntFloatMapOf

public static final @NonNull MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1)

Returns a new MutableIntFloatMap with key1 associated with value1.

mutableIntFloatMapOf

public static final @NonNull MutableIntFloatMap mutableIntFloatMapOf(int key1, float value1, int key2, float value2)

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

mutableIntFloatMapOf

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

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

mutableIntFloatMapOf

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

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

mutableIntFloatMapOf

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

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