ObjectFloatMapKt

Added in 1.4.0

public final class ObjectFloatMapKt


Summary

Public methods

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> buildObjectFloatMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectFloatMap<@NonNull K>, Unit> builderAction
)

Builds a new ObjectFloatMap by populating a MutableObjectFloatMap using the given builderAction.

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> buildObjectFloatMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectFloatMap<@NonNull K>, Unit> builderAction
)

Builds a new ObjectFloatMap by populating a MutableObjectFloatMap using the given builderAction.

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> emptyObjectFloatMap()

Returns an empty, read-only ObjectFloatMap.

static final @NonNull MutableObjectFloatMap<@NonNull K>

Returns a new empty MutableObjectFloatMap.

static final @NonNull MutableObjectFloatMap<@NonNull K>
<K extends Object> mutableObjectFloatMapOf(@NonNull K key1, float value1)

Returns a new MutableObjectFloatMap with only key1 associated with value1.

static final @NonNull MutableObjectFloatMap<@NonNull K>
<K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2
)

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

static final @NonNull MutableObjectFloatMap<@NonNull K>
<K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3
)

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

static final @NonNull MutableObjectFloatMap<@NonNull K>
<K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4
)

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

static final @NonNull MutableObjectFloatMap<@NonNull K>
<K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4,
    @NonNull K key5,
    float value5
)

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

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> objectFloatMap()

Returns an empty, read-only ObjectFloatMap.

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> objectFloatMapOf(@NonNull K key1, float value1)

Returns a new ObjectFloatMap with only key1 associated with value1.

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2
)

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

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3
)

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

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4
)

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

static final @NonNull ObjectFloatMap<@NonNull K>
<K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4,
    @NonNull K key5,
    float value5
)

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

Public methods

buildObjectFloatMap

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> buildObjectFloatMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectFloatMap<@NonNull K>, Unit> builderAction
)

Builds a new ObjectFloatMap by populating a MutableObjectFloatMap 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 MutableObjectFloatMap<@NonNull K>, Unit> builderAction

Lambda in which the MutableObjectFloatMap can be populated.

buildObjectFloatMap

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> buildObjectFloatMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectFloatMap<@NonNull K>, Unit> builderAction
)

Builds a new ObjectFloatMap by populating a MutableObjectFloatMap 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 MutableObjectFloatMap<@NonNull K>, Unit> builderAction

Lambda in which the MutableObjectFloatMap can be populated.

emptyObjectFloatMap

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> emptyObjectFloatMap()

Returns an empty, read-only ObjectFloatMap.

mutableObjectFloatMapOf

public static final @NonNull MutableObjectFloatMap<@NonNull K> <K extends Object> mutableObjectFloatMapOf()

Returns a new empty MutableObjectFloatMap.

mutableObjectFloatMapOf

public static final @NonNull MutableObjectFloatMap<@NonNull K> <K extends Object> mutableObjectFloatMapOf(@NonNull K key1, float value1)

Returns a new MutableObjectFloatMap with only key1 associated with value1.

mutableObjectFloatMapOf

public static final @NonNull MutableObjectFloatMap<@NonNull K> <K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2
)

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

mutableObjectFloatMapOf

public static final @NonNull MutableObjectFloatMap<@NonNull K> <K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3
)

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

mutableObjectFloatMapOf

public static final @NonNull MutableObjectFloatMap<@NonNull K> <K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4
)

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

mutableObjectFloatMapOf

public static final @NonNull MutableObjectFloatMap<@NonNull K> <K extends Object> mutableObjectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4,
    @NonNull K key5,
    float value5
)

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

objectFloatMap

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> objectFloatMap()

Returns an empty, read-only ObjectFloatMap.

objectFloatMapOf

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> objectFloatMapOf(@NonNull K key1, float value1)

Returns a new ObjectFloatMap with only key1 associated with value1.

objectFloatMapOf

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2
)

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

objectFloatMapOf

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3
)

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

objectFloatMapOf

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4
)

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

objectFloatMapOf

public static final @NonNull ObjectFloatMap<@NonNull K> <K extends Object> objectFloatMapOf(
    @NonNull K key1,
    float value1,
    @NonNull K key2,
    float value2,
    @NonNull K key3,
    float value3,
    @NonNull K key4,
    float value4,
    @NonNull K key5,
    float value5
)

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