com.koloboke.collect.map
Interface IntIntMapFactory<F extends IntIntMapFactory<F>>

Type Parameters:
F - the concrete factory type which extends this interface
All Superinterfaces:
ContainerFactory<F>
All Known Subinterfaces:
HashIntIntMapFactory

public interface IntIntMapFactory<F extends IntIntMapFactory<F>>
extends ContainerFactory<F>

An immutable factory of IntIntMaps.

See Also:
IntIntMap, @KolobokeMap

Method Summary
 int getDefaultValue()
          Returns the value to which default value of the maps constructed by this factory is set.
 IntIntMap newImmutableMap(Consumer<IntIntConsumer> entriesSupplier)
          Constructs a new immutable map filled with mappings consumed by the callback within the given closure.
 IntIntMap newImmutableMap(Consumer<IntIntConsumer> entriesSupplier, int expectedSize)
          Constructs a new immutable map filled with mappings consumed by the callback within the given closure.
 IntIntMap newImmutableMap(int[] keys, int[] values)
          Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newImmutableMap(int[] keys, int[] values, int expectedSize)
          Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newImmutableMap(Integer[] keys, Integer[] values)
          Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newImmutableMap(Integer[] keys, Integer[] values, int expectedSize)
          Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newImmutableMap(Iterable<Integer> keys, Iterable<Integer> values)
          Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position.
 IntIntMap newImmutableMap(Iterable<Integer> keys, Iterable<Integer> values, int expectedSize)
          Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position.
 IntIntMap newImmutableMap(Map<Integer,Integer> map)
          Constructs a new immutable map with the same mappings as the specified map.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, int expectedSize)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, int expectedSize)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, int expectedSize)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, Map<Integer,Integer> map5)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, Map<Integer,Integer> map5, int expectedSize)
          Constructs a new immutable map which merge the mappings of the specified maps.
 IntIntMap newImmutableMapOf(int k1, int v1)
          Constructs a new immutable map of the single specified mapping.
 IntIntMap newImmutableMapOf(int k1, int v1, int k2, int v2)
          Constructs a new immutable map of the two specified mappings.
 IntIntMap newImmutableMapOf(int k1, int v1, int k2, int v2, int k3, int v3)
          Constructs a new immutable map of the three specified mappings.
 IntIntMap newImmutableMapOf(int k1, int v1, int k2, int v2, int k3, int v3, int k4, int v4)
          Constructs a new immutable map of the four specified mappings.
 IntIntMap newImmutableMapOf(int k1, int v1, int k2, int v2, int k3, int v3, int k4, int v4, int k5, int v5)
          Constructs a new immutable map of the five specified mappings.
 IntIntMap newMutableMap()
          Constructs a new empty mutable map of the default expected size.
 IntIntMap newMutableMap(Consumer<IntIntConsumer> entriesSupplier)
          Constructs a new mutable map filled with mappings consumed by the callback within the given closure.
 IntIntMap newMutableMap(Consumer<IntIntConsumer> entriesSupplier, int expectedSize)
          Constructs a new mutable map filled with mappings consumed by the callback within the given closure.
 IntIntMap newMutableMap(int expectedSize)
          Constructs a new empty mutable map of the given expected size.
 IntIntMap newMutableMap(int[] keys, int[] values)
          Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newMutableMap(int[] keys, int[] values, int expectedSize)
          Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newMutableMap(Integer[] keys, Integer[] values)
          Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newMutableMap(Integer[] keys, Integer[] values, int expectedSize)
          Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newMutableMap(Iterable<Integer> keys, Iterable<Integer> values)
          Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position.
 IntIntMap newMutableMap(Iterable<Integer> keys, Iterable<Integer> values, int expectedSize)
          Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position.
 IntIntMap newMutableMap(Map<Integer,Integer> map)
          Constructs a new mutable map with the same mappings as the specified map.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, int expectedSize)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, int expectedSize)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, int expectedSize)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, Map<Integer,Integer> map5)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, Map<Integer,Integer> map5, int expectedSize)
          Constructs a new mutable map which merge the mappings of the specified maps.
 IntIntMap newMutableMapOf(int k1, int v1)
          Constructs a new mutable map of the single specified mapping.
 IntIntMap newMutableMapOf(int k1, int v1, int k2, int v2)
          Constructs a new mutable map of the two specified mappings.
 IntIntMap newMutableMapOf(int k1, int v1, int k2, int v2, int k3, int v3)
          Constructs a new mutable map of the three specified mappings.
 IntIntMap newMutableMapOf(int k1, int v1, int k2, int v2, int k3, int v3, int k4, int v4)
          Constructs a new mutable map of the four specified mappings.
 IntIntMap newMutableMapOf(int k1, int v1, int k2, int v2, int k3, int v3, int k4, int v4, int k5, int v5)
          Constructs a new mutable map of the five specified mappings.
 IntIntMap newUpdatableMap()
          Constructs a new empty updatable map of the default expected size.
 IntIntMap newUpdatableMap(Consumer<IntIntConsumer> entriesSupplier)
          Constructs a new updatable map filled with mappings consumed by the callback within the given closure.
 IntIntMap newUpdatableMap(Consumer<IntIntConsumer> entriesSupplier, int expectedSize)
          Constructs a new updatable map filled with mappings consumed by the callback within the given closure.
 IntIntMap newUpdatableMap(int expectedSize)
          Constructs a new empty updatable map of the given expected size.
 IntIntMap newUpdatableMap(int[] keys, int[] values)
          Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newUpdatableMap(int[] keys, int[] values, int expectedSize)
          Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newUpdatableMap(Integer[] keys, Integer[] values)
          Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newUpdatableMap(Integer[] keys, Integer[] values, int expectedSize)
          Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index.
 IntIntMap newUpdatableMap(Iterable<Integer> keys, Iterable<Integer> values)
          Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position.
 IntIntMap newUpdatableMap(Iterable<Integer> keys, Iterable<Integer> values, int expectedSize)
          Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map)
          Constructs a new updatable map with the same mappings as the specified map.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, int expectedSize)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, int expectedSize)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, int expectedSize)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, Map<Integer,Integer> map5)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMap(Map<Integer,Integer> map1, Map<Integer,Integer> map2, Map<Integer,Integer> map3, Map<Integer,Integer> map4, Map<Integer,Integer> map5, int expectedSize)
          Constructs a new updatable map which merge the mappings of the specified maps.
 IntIntMap newUpdatableMapOf(int k1, int v1)
          Constructs a new updatable map of the single specified mapping.
 IntIntMap newUpdatableMapOf(int k1, int v1, int k2, int v2)
          Constructs a new updatable map of the two specified mappings.
 IntIntMap newUpdatableMapOf(int k1, int v1, int k2, int v2, int k3, int v3)
          Constructs a new updatable map of the three specified mappings.
 IntIntMap newUpdatableMapOf(int k1, int v1, int k2, int v2, int k3, int v3, int k4, int v4)
          Constructs a new updatable map of the four specified mappings.
 IntIntMap newUpdatableMapOf(int k1, int v1, int k2, int v2, int k3, int v3, int k4, int v4, int k5, int v5)
          Constructs a new updatable map of the five specified mappings.
 F withDefaultValue(int defaultValue)
          Returns a copy of this factory, with exception that it constructs maps with default value set to the given int value.
 
Methods inherited from interface com.koloboke.collect.ContainerFactory
getDefaultExpectedSize, withDefaultExpectedSize
 

Method Detail

getDefaultValue

int getDefaultValue()
Returns the value to which default value of the maps constructed by this factory is set. Default value is 0.

Returns:
the default value of the maps constructed by this factory

withDefaultValue

@Nonnull
F withDefaultValue(int defaultValue)
Returns a copy of this factory, with exception that it constructs maps with default value set to the given int value.

Parameters:
defaultValue - the new default int value
Returns:
a copy of this factory, which constructs maps with the given defaultValue

newMutableMap

@Nonnull
IntIntMap newMutableMap()
Constructs a new empty mutable map of the default expected size.

Returns:
a new empty mutable map

newMutableMap

@Nonnull
IntIntMap newMutableMap(int expectedSize)
Constructs a new empty mutable map of the given expected size.

Parameters:
expectedSize - the expected size of the returned map
Returns:
a new empty mutable map of the given expected size

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                int expectedSize)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the map2 have priority over mappings from the map1 with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
expectedSize - the expected size of the returned map
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                @Nonnull
                                Map<Integer,Integer> map3,
                                int expectedSize)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
expectedSize - the expected size of the returned map
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                @Nonnull
                                Map<Integer,Integer> map3,
                                @Nonnull
                                Map<Integer,Integer> map4,
                                int expectedSize)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
expectedSize - the expected size of the returned map
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                @Nonnull
                                Map<Integer,Integer> map3,
                                @Nonnull
                                Map<Integer,Integer> map4,
                                @Nonnull
                                Map<Integer,Integer> map5,
                                int expectedSize)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
map5 - the fifth map to merge
expectedSize - the expected size of the returned map
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Consumer<IntIntConsumer> entriesSupplier,
                                int expectedSize)
Constructs a new mutable map filled with mappings consumed by the callback within the given closure. Mappings supplied later within the closure have priority over the mappings passed earlier with the same keys.

Example: TODO

Parameters:
entriesSupplier - the function which supply mappings for the returned map via the callback passed in
expectedSize - the expected size of the returned map
Returns:
a new mutable map with mappings consumed by the callback within the given closure

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                int[] keys,
                                @Nonnull
                                int[] values,
                                int expectedSize)
Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
expectedSize - the expected size of the returned map
Returns:
a new mutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Integer[] keys,
                                @Nonnull
                                Integer[] values,
                                int expectedSize)
Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
expectedSize - the expected size of the returned map
Returns:
a new mutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length
NullPointerException - if keys or values contain null elements

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Iterable<Integer> keys,
                                @Nonnull
                                Iterable<Integer> values,
                                int expectedSize)
Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position. If keys have duplicate elements, value corresponding the key appeared last in the iteration is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys iterable at the same iteration position
expectedSize - the expected size of the returned map
Returns:
a new mutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values have different size

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map)
Constructs a new mutable map with the same mappings as the specified map.

Parameters:
map - the map whose mappings are to be placed in the returned map
Returns:
a new mutable map with the same mappings as the specified map

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the map2 have priority over mappings from the map1 with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                @Nonnull
                                Map<Integer,Integer> map3)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                @Nonnull
                                Map<Integer,Integer> map3,
                                @Nonnull
                                Map<Integer,Integer> map4)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Map<Integer,Integer> map1,
                                @Nonnull
                                Map<Integer,Integer> map2,
                                @Nonnull
                                Map<Integer,Integer> map3,
                                @Nonnull
                                Map<Integer,Integer> map4,
                                @Nonnull
                                Map<Integer,Integer> map5)
Constructs a new mutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
map5 - the fifth map to merge
Returns:
a new mutable map which merge the mappings of the specified maps

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Consumer<IntIntConsumer> entriesSupplier)
Constructs a new mutable map filled with mappings consumed by the callback within the given closure. Mappings supplied later within the closure have priority over the mappings passed earlier with the same keys.

Example: TODO

Parameters:
entriesSupplier - the function which supply mappings for the returned map via the callback passed in
Returns:
a new mutable map with mappings consumed by the callback within the given closure

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                int[] keys,
                                @Nonnull
                                int[] values)
Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
Returns:
a new mutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Integer[] keys,
                                @Nonnull
                                Integer[] values)
Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
Returns:
a new mutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length
NullPointerException - if keys or values contain null elements

newMutableMap

@Nonnull
IntIntMap newMutableMap(@Nonnull
                                Iterable<Integer> keys,
                                @Nonnull
                                Iterable<Integer> values)
Constructs a new mutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position. If keys have duplicate elements, value corresponding the key appeared last in the iteration is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys iterable at the same iteration position
Returns:
a new mutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values have different size

newMutableMapOf

@Nonnull
IntIntMap newMutableMapOf(int k1,
                                  int v1)
Constructs a new mutable map of the single specified mapping.

Parameters:
k1 - the key of the sole mapping
v1 - the value of the sole mapping
Returns:
a new mutable map of the single specified mapping

newMutableMapOf

@Nonnull
IntIntMap newMutableMapOf(int k1,
                                  int v1,
                                  int k2,
                                  int v2)
Constructs a new mutable map of the two specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
Returns:
a new mutable map of the two specified mappings

newMutableMapOf

@Nonnull
IntIntMap newMutableMapOf(int k1,
                                  int v1,
                                  int k2,
                                  int v2,
                                  int k3,
                                  int v3)
Constructs a new mutable map of the three specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
Returns:
a new mutable map of the three specified mappings

newMutableMapOf

@Nonnull
IntIntMap newMutableMapOf(int k1,
                                  int v1,
                                  int k2,
                                  int v2,
                                  int k3,
                                  int v3,
                                  int k4,
                                  int v4)
Constructs a new mutable map of the four specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
k4 - the key of the fourth mapping
v4 - the value of the fourth mapping
Returns:
a new mutable map of the four specified mappings

newMutableMapOf

@Nonnull
IntIntMap newMutableMapOf(int k1,
                                  int v1,
                                  int k2,
                                  int v2,
                                  int k3,
                                  int v3,
                                  int k4,
                                  int v4,
                                  int k5,
                                  int v5)
Constructs a new mutable map of the five specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
k4 - the key of the fourth mapping
v4 - the value of the fourth mapping
k5 - the key of the fifth mapping
v5 - the value of the fifth mapping
Returns:
a new mutable map of the five specified mappings

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap()
Constructs a new empty updatable map of the default expected size.

Returns:
a new empty updatable map

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(int expectedSize)
Constructs a new empty updatable map of the given expected size.

Parameters:
expectedSize - the expected size of the returned map
Returns:
a new empty updatable map of the given expected size

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  int expectedSize)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the map2 have priority over mappings from the map1 with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
expectedSize - the expected size of the returned map
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  int expectedSize)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
expectedSize - the expected size of the returned map
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4,
                                  int expectedSize)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
expectedSize - the expected size of the returned map
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4,
                                  @Nonnull
                                  Map<Integer,Integer> map5,
                                  int expectedSize)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
map5 - the fifth map to merge
expectedSize - the expected size of the returned map
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Consumer<IntIntConsumer> entriesSupplier,
                                  int expectedSize)
Constructs a new updatable map filled with mappings consumed by the callback within the given closure. Mappings supplied later within the closure have priority over the mappings passed earlier with the same keys.

Example: TODO

Parameters:
entriesSupplier - the function which supply mappings for the returned map via the callback passed in
expectedSize - the expected size of the returned map
Returns:
a new updatable map with mappings consumed by the callback within the given closure

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  int[] keys,
                                  @Nonnull
                                  int[] values,
                                  int expectedSize)
Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
expectedSize - the expected size of the returned map
Returns:
a new updatable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Integer[] keys,
                                  @Nonnull
                                  Integer[] values,
                                  int expectedSize)
Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
expectedSize - the expected size of the returned map
Returns:
a new updatable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length
NullPointerException - if keys or values contain null elements

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Iterable<Integer> keys,
                                  @Nonnull
                                  Iterable<Integer> values,
                                  int expectedSize)
Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position. If keys have duplicate elements, value corresponding the key appeared last in the iteration is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys iterable at the same iteration position
expectedSize - the expected size of the returned map
Returns:
a new updatable map with the given mappings
Throws:
IllegalArgumentException - if keys and values have different size

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map)
Constructs a new updatable map with the same mappings as the specified map.

Parameters:
map - the map whose mappings are to be placed in the returned map
Returns:
a new updatable map with the same mappings as the specified map

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the map2 have priority over mappings from the map1 with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4,
                                  @Nonnull
                                  Map<Integer,Integer> map5)
Constructs a new updatable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
map5 - the fifth map to merge
Returns:
a new updatable map which merge the mappings of the specified maps

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Consumer<IntIntConsumer> entriesSupplier)
Constructs a new updatable map filled with mappings consumed by the callback within the given closure. Mappings supplied later within the closure have priority over the mappings passed earlier with the same keys.

Example: TODO

Parameters:
entriesSupplier - the function which supply mappings for the returned map via the callback passed in
Returns:
a new updatable map with mappings consumed by the callback within the given closure

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  int[] keys,
                                  @Nonnull
                                  int[] values)
Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
Returns:
a new updatable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Integer[] keys,
                                  @Nonnull
                                  Integer[] values)
Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
Returns:
a new updatable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length
NullPointerException - if keys or values contain null elements

newUpdatableMap

@Nonnull
IntIntMap newUpdatableMap(@Nonnull
                                  Iterable<Integer> keys,
                                  @Nonnull
                                  Iterable<Integer> values)
Constructs a new updatable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position. If keys have duplicate elements, value corresponding the key appeared last in the iteration is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys iterable at the same iteration position
Returns:
a new updatable map with the given mappings
Throws:
IllegalArgumentException - if keys and values have different size

newUpdatableMapOf

@Nonnull
IntIntMap newUpdatableMapOf(int k1,
                                    int v1)
Constructs a new updatable map of the single specified mapping.

Parameters:
k1 - the key of the sole mapping
v1 - the value of the sole mapping
Returns:
a new updatable map of the single specified mapping

newUpdatableMapOf

@Nonnull
IntIntMap newUpdatableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2)
Constructs a new updatable map of the two specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
Returns:
a new updatable map of the two specified mappings

newUpdatableMapOf

@Nonnull
IntIntMap newUpdatableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2,
                                    int k3,
                                    int v3)
Constructs a new updatable map of the three specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
Returns:
a new updatable map of the three specified mappings

newUpdatableMapOf

@Nonnull
IntIntMap newUpdatableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2,
                                    int k3,
                                    int v3,
                                    int k4,
                                    int v4)
Constructs a new updatable map of the four specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
k4 - the key of the fourth mapping
v4 - the value of the fourth mapping
Returns:
a new updatable map of the four specified mappings

newUpdatableMapOf

@Nonnull
IntIntMap newUpdatableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2,
                                    int k3,
                                    int v3,
                                    int k4,
                                    int v4,
                                    int k5,
                                    int v5)
Constructs a new updatable map of the five specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
k4 - the key of the fourth mapping
v4 - the value of the fourth mapping
k5 - the key of the fifth mapping
v5 - the value of the fifth mapping
Returns:
a new updatable map of the five specified mappings

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  int expectedSize)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the map2 have priority over mappings from the map1 with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
expectedSize - the expected size of the returned map
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  int expectedSize)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
expectedSize - the expected size of the returned map
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4,
                                  int expectedSize)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
expectedSize - the expected size of the returned map
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4,
                                  @Nonnull
                                  Map<Integer,Integer> map5,
                                  int expectedSize)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
map5 - the fifth map to merge
expectedSize - the expected size of the returned map
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Consumer<IntIntConsumer> entriesSupplier,
                                  int expectedSize)
Constructs a new immutable map filled with mappings consumed by the callback within the given closure. Mappings supplied later within the closure have priority over the mappings passed earlier with the same keys.

Example: TODO

Parameters:
entriesSupplier - the function which supply mappings for the returned map via the callback passed in
expectedSize - the expected size of the returned map
Returns:
a new immutable map with mappings consumed by the callback within the given closure

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  int[] keys,
                                  @Nonnull
                                  int[] values,
                                  int expectedSize)
Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
expectedSize - the expected size of the returned map
Returns:
a new immutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Integer[] keys,
                                  @Nonnull
                                  Integer[] values,
                                  int expectedSize)
Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
expectedSize - the expected size of the returned map
Returns:
a new immutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length
NullPointerException - if keys or values contain null elements

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Iterable<Integer> keys,
                                  @Nonnull
                                  Iterable<Integer> values,
                                  int expectedSize)
Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position. If keys have duplicate elements, value corresponding the key appeared last in the iteration is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys iterable at the same iteration position
expectedSize - the expected size of the returned map
Returns:
a new immutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values have different size

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map)
Constructs a new immutable map with the same mappings as the specified map.

Parameters:
map - the map whose mappings are to be placed in the returned map
Returns:
a new immutable map with the same mappings as the specified map

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the map2 have priority over mappings from the map1 with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Map<Integer,Integer> map1,
                                  @Nonnull
                                  Map<Integer,Integer> map2,
                                  @Nonnull
                                  Map<Integer,Integer> map3,
                                  @Nonnull
                                  Map<Integer,Integer> map4,
                                  @Nonnull
                                  Map<Integer,Integer> map5)
Constructs a new immutable map which merge the mappings of the specified maps. On conflict, mappings from the maps passed later in the argument list have priority over mappings from the maps passed earlier with the same keys.

Parameters:
map1 - the first map to merge
map2 - the second map to merge
map3 - the third map to merge
map4 - the fourth map to merge
map5 - the fifth map to merge
Returns:
a new immutable map which merge the mappings of the specified maps

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Consumer<IntIntConsumer> entriesSupplier)
Constructs a new immutable map filled with mappings consumed by the callback within the given closure. Mappings supplied later within the closure have priority over the mappings passed earlier with the same keys.

Example: TODO

Parameters:
entriesSupplier - the function which supply mappings for the returned map via the callback passed in
Returns:
a new immutable map with mappings consumed by the callback within the given closure

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  int[] keys,
                                  @Nonnull
                                  int[] values)
Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
Returns:
a new immutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Integer[] keys,
                                  @Nonnull
                                  Integer[] values)
Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values arrays at the same index. If keys array have duplicate elements, value corresponding the key with the highest index is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys array at the same index
Returns:
a new immutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values arrays have different length
NullPointerException - if keys or values contain null elements

newImmutableMap

@Nonnull
IntIntMap newImmutableMap(@Nonnull
                                  Iterable<Integer> keys,
                                  @Nonnull
                                  Iterable<Integer> values)
Constructs a new immutable map with the given mappings, i. e. pairs of elements from the keys and values iterables at the same iteration position. If keys have duplicate elements, value corresponding the key appeared last in the iteration is left in the returned map.

Parameters:
keys - the keys of the returned map
values - the values of the returned map, each value is associated with the element of the keys iterable at the same iteration position
Returns:
a new immutable map with the given mappings
Throws:
IllegalArgumentException - if keys and values have different size

newImmutableMapOf

@Nonnull
IntIntMap newImmutableMapOf(int k1,
                                    int v1)
Constructs a new immutable map of the single specified mapping.

Parameters:
k1 - the key of the sole mapping
v1 - the value of the sole mapping
Returns:
a new immutable map of the single specified mapping

newImmutableMapOf

@Nonnull
IntIntMap newImmutableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2)
Constructs a new immutable map of the two specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
Returns:
a new immutable map of the two specified mappings

newImmutableMapOf

@Nonnull
IntIntMap newImmutableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2,
                                    int k3,
                                    int v3)
Constructs a new immutable map of the three specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
Returns:
a new immutable map of the three specified mappings

newImmutableMapOf

@Nonnull
IntIntMap newImmutableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2,
                                    int k3,
                                    int v3,
                                    int k4,
                                    int v4)
Constructs a new immutable map of the four specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
k4 - the key of the fourth mapping
v4 - the value of the fourth mapping
Returns:
a new immutable map of the four specified mappings

newImmutableMapOf

@Nonnull
IntIntMap newImmutableMapOf(int k1,
                                    int v1,
                                    int k2,
                                    int v2,
                                    int k3,
                                    int v3,
                                    int k4,
                                    int v4,
                                    int k5,
                                    int v5)
Constructs a new immutable map of the five specified mappings.

Parameters:
k1 - the key of the first mapping
v1 - the value of the first mapping
k2 - the key of the second mapping
v2 - the value of the second mapping
k3 - the key of the third mapping
v3 - the value of the third mapping
k4 - the key of the fourth mapping
v4 - the value of the fourth mapping
k5 - the key of the fifth mapping
v5 - the value of the fifth mapping
Returns:
a new immutable map of the five specified mappings