IntObjectMapKt

Added in 1.4.0

public final class IntObjectMapKt


Summary

Public methods

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> buildIntObjectMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new IntObjectMap by populating a MutableIntObjectMap using the given builderAction.

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> buildIntObjectMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new IntObjectMap by populating a MutableIntObjectMap using the given builderAction.

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> emptyIntObjectMap()

Returns an empty, read-only IntObjectMap.

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> intObjectMapOf()

Returns an empty, read-only IntObjectMap.

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> intObjectMapOf(int key1, @NonNull V value1)

Returns a new IntObjectMap with key1 associated with value1.

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2
)

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

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3
)

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

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4
)

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

static final @NonNull IntObjectMap<@NonNull V>
<V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4,
    int key5,
    @NonNull V value5
)

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

static final @NonNull MutableIntObjectMap<@NonNull V>

Returns a new MutableIntObjectMap.

static final @NonNull MutableIntObjectMap<@NonNull V>
<V extends Object> mutableIntObjectMapOf(int key1, @NonNull V value1)

Returns a new MutableIntObjectMap with key1 associated with value1.

static final @NonNull MutableIntObjectMap<@NonNull V>
<V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2
)

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

static final @NonNull MutableIntObjectMap<@NonNull V>
<V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3
)

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

static final @NonNull MutableIntObjectMap<@NonNull V>
<V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4
)

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

static final @NonNull MutableIntObjectMap<@NonNull V>
<V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4,
    int key5,
    @NonNull V value5
)

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

Public methods

buildIntObjectMap

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> buildIntObjectMap(
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new IntObjectMap by populating a MutableIntObjectMap 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 MutableIntObjectMap<@NonNull V>, Unit> builderAction

Lambda in which the MutableIntObjectMap can be populated.

buildIntObjectMap

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> buildIntObjectMap(
    int initialCapacity,
    @ExtensionFunctionType @NonNull Function1<@NonNull MutableIntObjectMap<@NonNull V>, Unit> builderAction
)

Builds a new IntObjectMap by populating a MutableIntObjectMap 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 MutableIntObjectMap<@NonNull V>, Unit> builderAction

Lambda in which the MutableIntObjectMap can be populated.

emptyIntObjectMap

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> emptyIntObjectMap()

Returns an empty, read-only IntObjectMap.

intObjectMapOf

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> intObjectMapOf()

Returns an empty, read-only IntObjectMap.

intObjectMapOf

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> intObjectMapOf(int key1, @NonNull V value1)

Returns a new IntObjectMap with key1 associated with value1.

intObjectMapOf

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2
)

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

intObjectMapOf

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3
)

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

intObjectMapOf

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4
)

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

intObjectMapOf

public static final @NonNull IntObjectMap<@NonNull V> <V extends Object> intObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4,
    int key5,
    @NonNull V value5
)

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

mutableIntObjectMapOf

public static final @NonNull MutableIntObjectMap<@NonNull V> <V extends Object> mutableIntObjectMapOf()

Returns a new MutableIntObjectMap.

mutableIntObjectMapOf

public static final @NonNull MutableIntObjectMap<@NonNull V> <V extends Object> mutableIntObjectMapOf(int key1, @NonNull V value1)

Returns a new MutableIntObjectMap with key1 associated with value1.

mutableIntObjectMapOf

public static final @NonNull MutableIntObjectMap<@NonNull V> <V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2
)

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

mutableIntObjectMapOf

public static final @NonNull MutableIntObjectMap<@NonNull V> <V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3
)

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

mutableIntObjectMapOf

public static final @NonNull MutableIntObjectMap<@NonNull V> <V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4
)

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

mutableIntObjectMapOf

public static final @NonNull MutableIntObjectMap<@NonNull V> <V extends Object> mutableIntObjectMapOf(
    int key1,
    @NonNull V value1,
    int key2,
    @NonNull V value2,
    int key3,
    @NonNull V value3,
    int key4,
    @NonNull V value4,
    int key5,
    @NonNull V value5
)

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