ObjectIntMapKt

Added in 1.4.0

public final class ObjectIntMapKt


Summary

Public methods

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> buildObjectIntMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectIntMap<@NonNull K>, Unit> builderAction
)

Builds a new ObjectIntMap by populating a MutableObjectIntMap using the given builderAction.

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> buildObjectIntMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectIntMap<@NonNull K>, Unit> builderAction
)

Builds a new ObjectIntMap by populating a MutableObjectIntMap using the given builderAction.

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> emptyObjectIntMap()

Returns an empty, read-only ObjectIntMap.

static final @NonNull MutableObjectIntMap<@NonNull K>

Returns a new empty MutableObjectIntMap.

static final @NonNull MutableObjectIntMap<@NonNull K>
<K extends Object> mutableObjectIntMapOf(@NonNull K key1, int value1)

Returns a new MutableObjectIntMap with only key1 associated with value1.

static final @NonNull MutableObjectIntMap<@NonNull K>
<K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2
)

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

static final @NonNull MutableObjectIntMap<@NonNull K>
<K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3
)

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

static final @NonNull MutableObjectIntMap<@NonNull K>
<K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4
)

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

static final @NonNull MutableObjectIntMap<@NonNull K>
<K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4,
    @NonNull K key5,
    int value5
)

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

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> objectIntMap()

Returns an empty, read-only ObjectIntMap.

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> objectIntMapOf(@NonNull K key1, int value1)

Returns a new ObjectIntMap with only key1 associated with value1.

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2
)

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

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3
)

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

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4
)

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

static final @NonNull ObjectIntMap<@NonNull K>
<K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4,
    @NonNull K key5,
    int value5
)

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

Public methods

buildObjectIntMap

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> buildObjectIntMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectIntMap<@NonNull K>, Unit> builderAction
)

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

Lambda in which the MutableObjectIntMap can be populated.

buildObjectIntMap

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> buildObjectIntMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableObjectIntMap<@NonNull K>, Unit> builderAction
)

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

Lambda in which the MutableObjectIntMap can be populated.

emptyObjectIntMap

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> emptyObjectIntMap()

Returns an empty, read-only ObjectIntMap.

mutableObjectIntMapOf

public static final @NonNull MutableObjectIntMap<@NonNull K> <K extends Object> mutableObjectIntMapOf()

Returns a new empty MutableObjectIntMap.

mutableObjectIntMapOf

public static final @NonNull MutableObjectIntMap<@NonNull K> <K extends Object> mutableObjectIntMapOf(@NonNull K key1, int value1)

Returns a new MutableObjectIntMap with only key1 associated with value1.

mutableObjectIntMapOf

public static final @NonNull MutableObjectIntMap<@NonNull K> <K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2
)

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

mutableObjectIntMapOf

public static final @NonNull MutableObjectIntMap<@NonNull K> <K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3
)

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

mutableObjectIntMapOf

public static final @NonNull MutableObjectIntMap<@NonNull K> <K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4
)

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

mutableObjectIntMapOf

public static final @NonNull MutableObjectIntMap<@NonNull K> <K extends Object> mutableObjectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4,
    @NonNull K key5,
    int value5
)

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

objectIntMap

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> objectIntMap()

Returns an empty, read-only ObjectIntMap.

objectIntMapOf

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> objectIntMapOf(@NonNull K key1, int value1)

Returns a new ObjectIntMap with only key1 associated with value1.

objectIntMapOf

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2
)

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

objectIntMapOf

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3
)

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

objectIntMapOf

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4
)

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

objectIntMapOf

public static final @NonNull ObjectIntMap<@NonNull K> <K extends Object> objectIntMapOf(
    @NonNull K key1,
    int value1,
    @NonNull K key2,
    int value2,
    @NonNull K key3,
    int value3,
    @NonNull K key4,
    int value4,
    @NonNull K key5,
    int value5
)

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