Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.map.mutable.primitive

public Class IntObjectHashMap<V>

extends Object
implements MutableIntObjectMap<V>, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.map.primitive.MutableIntObjectMap, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap, org.eclipse.collections.api.map.primitive.PrimitiveObjectMap, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable, org.eclipse.collections.api.map.primitive.IntObjectMap
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.lang.reflect.Array, java.util.Arrays, .Collection, .Comparator, .Iterator, .NoSuchElementException, .Optional, org.eclipse.collections.api.IntIterable, .LazyIntIterable, .LazyIterable, .RichIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.MutableBooleanBag, .MutableByteBag, .MutableCharBag, .MutableDoubleBag, .MutableFloatBag, .MutableIntBag, .MutableLongBag, .MutableShortBag, org.eclipse.collections.api.bag.sorted.MutableSortedBag, org.eclipse.collections.api.bimap.MutableBiMap, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, org.eclipse.collections.api.block.function.primitive.IntToObjectFunction, .BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .DoubleObjectToDoubleFunction, .FloatFunction, .FloatObjectToFloatFunction, .IntFunction, .IntObjectToIntFunction, .LongFunction, .LongObjectToLongFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.predicate.primitive.IntObjectPredicate, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.IntObjectProcedure, .IntProcedure, .ObjectIntProcedure, org.eclipse.collections.api.factory.Bags, .BiMaps, .Lists, org.eclipse.collections.api.factory.primitive.IntObjectMaps, .ObjectIntMaps, .ObjectDoubleMaps, .ObjectLongMaps, org.eclipse.collections.api.iterator.IntIterator, .MutableIntIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.map.MutableMap, .MutableMapIterable, org.eclipse.collections.api.map.primitive.IntObjectMap, .ImmutableIntObjectMap, .MutableObjectDoubleMap, .MutableObjectLongMap, .MutableIntObjectMap, .MutableObjectIntMap, org.eclipse.collections.api.map.sorted.MutableSortedMap, org.eclipse.collections.api.multimap.MutableMultimap, org.eclipse.collections.api.multimap.bag.MutableBagMultimap, org.eclipse.collections.api.partition.bag.PartitionMutableBag, org.eclipse.collections.api.set.MutableSet, org.eclipse.collections.api.set.primitive.IntSet, .MutableIntSet, org.eclipse.collections.api.set.sorted.MutableSortedSet, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.api.tuple.primitive.IntObjectPair, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.impl.bag.mutable.HashBag, org.eclipse.collections.impl.bag.mutable.primitive.BooleanHashBag, .ByteHashBag, .CharHashBag, .DoubleHashBag, .FloatHashBag, .IntHashBag, .LongHashBag, .ShortHashBag, org.eclipse.collections.impl.bag.sorted.mutable.TreeBag, org.eclipse.collections.impl.block.factory.Comparators, .Functions, .Functions0, .Predicates, .PrimitiveFunctions, .Procedures2, org.eclipse.collections.impl.block.procedure.BiMapCollectProcedure, .MapCollectProcedure, .MutatingAggregationProcedure, .PartitionProcedure, .SelectInstancesOfProcedure, org.eclipse.collections.impl.iterator.UnmodifiableIntIterator, org.eclipse.collections.impl.lazy.AbstractLazyIterable, org.eclipse.collections.impl.lazy.primitive.AbstractLazyIntIterable, org.eclipse.collections.impl.map.mutable.UnifiedMap, org.eclipse.collections.impl.map.sorted.mutable.TreeSortedMap, org.eclipse.collections.impl.multimap.bag.HashBagMultimap, org.eclipse.collections.impl.partition.bag.PartitionHashBag, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.set.mutable.primitive.IntHashSet, org.eclipse.collections.impl.set.sorted.mutable.TreeSortedSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate, .LazyIterate, org.eclipse.collections.impl.utility.internal.IterableIterate

This file was automatically generated from template file primitiveObjectHashMap.stg.
Since
3.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private class
private class
private class
private class
private static class
protected class

Field Summary

Modifier and TypeField and Description
private static final int
private boolean
private static final int
private static final int
private static final int
private static final int
private int[]
private int
private int
private static final int
private IntObjectHashMap.SentinelValues<V>
private static final long
private V[]

Constructor Summary

AccessConstructor and Description
public
public
IntObjectHashMap(int initialCapacity)

public
IntObjectHashMap(IntObjectMap<? extends V> map)

Method Summary

Modifier and TypeMethod and Description
private void
addKeyValueAtIndex(int key, V value, int index)

public <K, VV> MutableMap<K, VV>
aggregateInPlaceBy(Function<? super V, ? extends K> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator)

Overrides default org.eclipse.collections.api.RichIterable.aggregateInPlaceBy.

Implements org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.aggregateInPlaceBy.

Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.

protected void
allocateTable(int sizeToAllocate)

public boolean
allSatisfy(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.allSatisfy.

Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty.

public <P> boolean
allSatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.allSatisfyWith.

Returns true if the predicate evaluates to true for every element of the collection, or returns false.

public boolean
anySatisfy(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.anySatisfy.

Returns true if the predicate evaluates to true for any element of the iterable.

public <P> boolean
anySatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.anySatisfyWith.

Returns true if the predicate evaluates to true for any element of the collection, or return false.

public void
appendString(Appendable appendable)

Overrides default org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyIterable<V>
asLazy()

Implements org.eclipse.collections.api.RichIterable.asLazy.

Returns a lazy (deferred) iterable, most likely implemented by calling LazyIterate.adapt(this).

public MutableIntObjectMap<V>
asSynchronized()

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.asSynchronized.

Returns a synchronized view of this map, delegating all operations to this map but ensuring only one caller has access to the map at a time.

public MutableIntObjectMap<V>
asUnmodifiable()

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.asUnmodifiable.

Returns an unmodifiable view of this map, delegating all read-only operations to this map and throwing an UnsupportedOperationException for all mutating operations.

public RichIterable<RichIterable<V>>
chunk(int size)

Implements org.eclipse.collections.api.RichIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <VV> MutableBag<VV>
collect(Function<? super V, ? extends VV> function)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collect, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <VV, R extends Collection<VV>> R
collect(Function<? super V, ? extends VV> function, R target)

Implements org.eclipse.collections.api.RichIterable.collect.

Same as collect(Function), except that the results are gathered into the specified target collection.

public MutableBooleanBag
collectBoolean(BooleanFunction<? super V> booleanFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectBoolean, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectBoolean.

Returns a new primitive boolean iterable with the results of applying the specified function on each element of the source collection.

public MutableByteBag
collectByte(ByteFunction<? super V> byteFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectByte, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectByte.

Returns a new primitive byte iterable with the results of applying the specified function on each element of the source collection.

public MutableCharBag
collectChar(CharFunction<? super V> charFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectChar, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectChar.

Returns a new primitive char iterable with the results of applying the specified function on each element of the source collection.

public MutableDoubleBag
collectDouble(DoubleFunction<? super V> doubleFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectDouble, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectDouble.

Returns a new primitive double iterable with the results of applying the specified function on each element of the source collection.

public MutableFloatBag
collectFloat(FloatFunction<? super V> floatFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectFloat, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectFloat.

Returns a new primitive float iterable with the results of applying the specified function on each element of the source collection.

public <VV> MutableBag<VV>
collectIf(Predicate<? super V> predicate, Function<? super V, ? extends VV> function)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectIf, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectIf.

Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate.

public <VV, R extends Collection<VV>> R
collectIf(Predicate<? super V> predicate, Function<? super V, ? extends VV> function, R target)

Implements org.eclipse.collections.api.RichIterable.collectIf.

Same as the collectIf method with two parameters but uses the specified target collection for the results.

public MutableIntBag
collectInt(IntFunction<? super V> intFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectInt, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectInt.

Returns a new primitive int iterable with the results of applying the specified function on each element of the source collection.

public MutableLongBag
collectLong(LongFunction<? super V> longFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectLong, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectLong.

Returns a new primitive long iterable with the results of applying the specified function on each element of the source collection.

public MutableShortBag
collectShort(ShortFunction<? super V> shortFunction)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectShort, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectShort.

Returns a new primitive short iterable with the results of applying the specified function on each element of the source collection.

public <P, VV> MutableBag<VV>
collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.collectWith, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.collectWith.

Same as collect(Function) with a Function2 and specified parameter which is passed to the block.

public <P, VV, R extends Collection<VV>> R
collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.collectWith.

Same as collectWith but with a targetCollection parameter to gather the results.

public void
compact()
Deprecated since 12.0 - Use trimToSize() instead

Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.

public boolean
contains(Object object)

Implements org.eclipse.collections.api.RichIterable.contains.

Returns true if the iterable has an element which responds true to element.equals(object).

public boolean
containsAll(Collection<?> source)

Implements org.eclipse.collections.api.RichIterable.containsAll.

Returns true if all elements in source are contained in this collection.

public boolean
containsAllArguments(Object... elements)

Implements org.eclipse.collections.api.RichIterable.containsAllArguments.

Returns true if all elements in the specified var arg array are contained in this collection.

public boolean
containsAllIterable(Iterable<?> source)

Implements org.eclipse.collections.api.RichIterable.containsAllIterable.

Returns true if all elements in source are contained in this collection.

public boolean
containsKey(int key)

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.containsKey.

Returns whether or not the key is present in the map.

public boolean
private void
public int
count(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.count.

Return the total number of elements that answer true to the specified predicate.

public <P> int
countWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.countWith.

Returns the total number of elements that evaluate to true for the specified predicate.

public V
detect(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.detect.

Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true.

public V
detectIfNone(Predicate<? super V> predicate, Function0<? extends V> function)

Overrides default org.eclipse.collections.api.RichIterable.detectIfNone.

Returns the first element of the iterable for which the predicate evaluates to true.

public Optional<V>
detectOptional(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.detectOptional.

Returns the first element of the iterable for which the predicate evaluates to true as an Optional.

public <P> V
detectWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.detectWith.

Returns the first element that evaluates to true for the specified predicate2 and parameter, or null if none evaluate to true.

public <P> V
detectWithIfNone(Predicate2<? super V, ? super P> predicate, P parameter, Function0<? extends V> function)

Implements org.eclipse.collections.api.RichIterable.detectWithIfNone.

Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter, or returns the value of evaluating the specified function.

public <P> Optional<V>
detectWithOptional(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.detectWithOptional.

Returns the first element that evaluates to true for the specified predicate2 and parameter as an Optional.

public void
each(Procedure<? super V> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public boolean
private int
fastCeil(float v)

public <VV> MutableBag<VV>
public <VV, R extends Collection<VV>> R
flatCollect(Function<? super V, ? extends Iterable<VV>> function, R target)

Implements org.eclipse.collections.api.RichIterable.flatCollect.

Same as flatCollect, only the results are collected into the target collection.

public MutableObjectIntMap<V>
flipUniqueValues()

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.flipUniqueValues.

Return the ObjectIntMap that is obtained by flipping the direction of this map and making the associations from value to key.

public void
forEachKey(IntProcedure procedure)

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.forEachKey.

Iterates through each key in the map, invoking the procedure for each.

public void
forEachKeyValue(IntObjectProcedure<? super V> procedure)

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.forEachKeyValue.

Iterates through each key/value pair in the map, invoking the procedure for each.

public void
public <P> void
forEachWith(Procedure2<? super V, ? super P> procedure, P parameter)

Implements org.eclipse.collections.api.InternalIterable.forEachWith.

The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.

public void
forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)

Implements org.eclipse.collections.api.InternalIterable.forEachWithIndex.

Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.

public V
get(int key)

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.get.

Retrieves the value associated with the key.

public V
getFirst()

Implements org.eclipse.collections.api.RichIterable.getFirst.

Returns the first element of an iterable.

public V
getIfAbsent(int key, Function0<? extends V> ifAbsent)

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.getIfAbsent.

Retrieves the value associated with the key if one exists; if it does not, returns the result of invoking the value supplier.

public V
getIfAbsentPut(int key, V value)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.getIfAbsentPut.

Retrieves the value associated with the key if one exists; if it does not, associates a value with the key.

public V
getIfAbsentPut(int key, Function0<? extends V> function)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.getIfAbsentPut, org.eclipse.collections.api.map.primitive.MutableIntObjectMap.getIfAbsentPut.

Retrieves the value associated with the key if one exists; if it does not, invokes the supplier and associates the result with the key.

public <P> V
getIfAbsentPutWith(int key, Function<? super P, ? extends V> function, P parameter)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.getIfAbsentPutWith.

Retrieves the value associated with the key if one exists; if it does not, invokes the value function with the parameter and associates the result with the key.

public V
getIfAbsentPutWithKey(int key, IntToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.getIfAbsentPutWithKey.

Retrieves the value associated with the key if one exists; if it does not, associates the result of invoking the value function with the key.

public V
getLast()

Implements org.eclipse.collections.api.RichIterable.getLast.

Returns the last element of an iterable.

public V
getOnly()

Overrides default org.eclipse.collections.api.RichIterable.getOnly.

Returns the element if the iterable has exactly one element.

public <VV> MutableBagMultimap<VV, V>
groupBy(Function<? super V, ? extends VV> function)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.groupBy, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.groupBy.

For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable.

public <VV, R extends MutableMultimap<VV, V>> R
groupBy(Function<? super V, ? extends VV> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupBy.

Same as groupBy(Function), except that the results are gathered into the specified target multimap.

public <VV> MutableBagMultimap<VV, V>
groupByEach(Function<? super V, ? extends Iterable<VV>> function)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.groupByEach, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.groupByEach.

Similar to groupBy(Function), except the result of evaluating function will return a collection of keys for each value.

public <VV, R extends MutableMultimap<VV, V>> R
groupByEach(Function<? super V, ? extends Iterable<VV>> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupByEach.

Same as groupByEach(Function), except that the results are gathered into the specified target multimap.

public <VV> MutableMap<VV, V>
groupByUniqueKey(Function<? super V, ? extends VV> function)

Overrides default org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.groupByUniqueKey.

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.groupByUniqueKey.

For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key.

public <VV, R extends MutableMapIterable<VV, V>> R
groupByUniqueKey(Function<? super V, ? extends VV> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey.

Same as groupByUniqueKey(Function), except that the results are gathered into the specified target map.

public int
public <IV> IV
injectInto(IV injectedValue, Function2<? super IV, ? super V, ? extends IV> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public int
injectInto(int injectedValue, IntObjectToIntFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final int result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public long
injectInto(long injectedValue, LongObjectToLongFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final long result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public float
injectInto(float injectedValue, FloatObjectToFloatFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final float result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public double
injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final double result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public <R extends Collection<V>> R
into(R target)

Implements org.eclipse.collections.api.RichIterable.into.

Adds all the elements in this iterable to the specific target Collection.

public boolean
isEmpty()

Implements org.eclipse.collections.api.RichIterable.isEmpty.

Returns true if this iterable has zero items.

private static boolean
isEmptyKey(int key)

private static boolean
isNonSentinel(int key)

private static boolean
isRemovedKey(int key)

public Iterator<V>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public MutableIntSet
keySet()

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.keySet.

Returns a set containing all the keys in this map.

public LazyIntIterable
keysView()

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.keysView.

Returns a view of the keys in this map.

public RichIterable<IntObjectPair<V>>
keyValuesView()

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.keyValuesView.

Returns a view of the key/value pairs in this map.

public String
makeString()

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public String
makeString(String separator)

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public String
makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

private int
mask(int spread)

public V
max(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.max.

Returns the maximum element out of this container based on the comparator.

public V
max()

Implements org.eclipse.collections.api.RichIterable.max.

Returns the maximum element out of this container based on the natural order.

public <VV extends Comparable<? super VV>> V
maxBy(Function<? super V, ? extends VV> function)

Implements org.eclipse.collections.api.RichIterable.maxBy.

Returns the maximum elements out of this container based on the natural order of the attribute returned by Function.

private int
public V
min(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.min.

Returns the minimum element out of this container based on the comparator.

public V
min()

Implements org.eclipse.collections.api.RichIterable.min.

Returns the minimum element out of this container based on the natural order.

public <VV extends Comparable<? super VV>> V
minBy(Function<? super V, ? extends VV> function)

Implements org.eclipse.collections.api.RichIterable.minBy.

Returns the minimum elements out of this container based on the natural order of the attribute returned by Function.

public static <V> IntObjectHashMap<V>
public static <V> IntObjectHashMap<V>
newMap(IntObjectMap<? extends V> map)

public static <V> IntObjectHashMap<V>
newWithKeysValues(int key, V value)

public static <V> IntObjectHashMap<V>
newWithKeysValues(int key1, V value1, int key2, V value2)

public static <V> IntObjectHashMap<V>
newWithKeysValues(int key1, V value1, int key2, V value2, int key3, V value3)

public static <V> IntObjectHashMap<V>
newWithKeysValues(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4)

public boolean
noneSatisfy(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.noneSatisfy.

Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty.

public <P> boolean
noneSatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.noneSatisfyWith.

Returns true if the predicate evaluates to false for every element of the collection, or return false.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.RichIterable.notEmpty.

The English equivalent of !this.isEmpty()

private static boolean
public PartitionMutableBag<V>
partition(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.partition, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.partition.

Filters a collection into a PartitionedIterable based on the evaluation of the predicate.

public <P> PartitionMutableBag<V>
partitionWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.partitionWith, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.partitionWith.

Filters a collection into a PartitionIterable based on the evaluation of the predicate.

pack-priv int
probe(int element)

pack-priv int
probeThree(int element, int removedIndex)

pack-priv int
probeTwo(int element, int removedIndex)

public V
put(int key, V value)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.put.

Associates a value with the specified key.

public void
putAll(IntObjectMap<? extends V> map)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.putAll.

Puts all of the key/value mappings from the specified map into this map.

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

private void
rehash(int newCapacity)

private void
public IntObjectHashMap<V>
reject(IntObjectPredicate<? super V> predicate)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.reject.

Return a copy of this map containing only the key/value pairs that do not match the predicate.

public MutableBag<V>
reject(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.reject, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.reject.

Returns all elements of the source collection that return false when evaluating of the predicate.

public <R extends Collection<V>> R
reject(Predicate<? super V> predicate, R target)

Implements org.eclipse.collections.api.RichIterable.reject.

Same as the reject method with one parameter but uses the specified target collection for the results.

public <P> MutableBag<V>
rejectWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.rejectWith, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.rejectWith.

Similar to reject(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public <P, R extends Collection<V>> R
rejectWith(Predicate2<? super V, ? super P> predicate, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.rejectWith.

Similar to reject(Predicate, Collection), except with an evaluation parameter for the second generic argument in Predicate2.

public V
remove(int key)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.remove.

Removes the mapping associated with the key, if one exists, from the map.

public boolean
removeIf(IntObjectPredicate<? super V> predicate)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.removeIf.

Remove an entry from the map if the predicate evaluates to true.

public V
removeKey(int key)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.removeKey.

Removes the mapping associated with the key, if one exists, from the map.

private void
removeKeyAtIndex(int index)

public IntObjectHashMap<V>
select(IntObjectPredicate<? super V> predicate)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.select.

Return a copy of this map containing only the key/value pairs that match the predicate.

public MutableBag<V>
select(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.select, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.select.

Returns all elements of the source collection that return true when evaluating the predicate.

public <R extends Collection<V>> R
select(Predicate<? super V> predicate, R target)

Implements org.eclipse.collections.api.RichIterable.select.

Same as the select method with one parameter but uses the specified target collection for the results.

public <S> MutableBag<S>
public <P> MutableBag<V>
selectWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.selectWith, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.selectWith.

Similar to select(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public <P, R extends Collection<V>> R
selectWith(Predicate2<? super V, ? super P> predicate, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.selectWith.

Similar to select(Predicate, Collection), except with an evaluation parameter for the second generic argument in Predicate2.

public int
size()

Implements org.eclipse.collections.api.RichIterable.size.

Returns the number of items in this iterable.

private int
pack-priv int
spreadAndMask(int element)

pack-priv int
spreadTwoAndMask(int element)

public <V1> MutableObjectDoubleMap<V1>
sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumByDouble, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.sumByDouble.

Groups and sums the values using the two specified functions.

public <V1> MutableObjectDoubleMap<V1>
sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumByFloat, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.sumByFloat.

Groups and sums the values using the two specified functions.

public <V1> MutableObjectLongMap<V1>
sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumByInt, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.sumByInt.

Groups and sums the values using the two specified functions.

public <V1> MutableObjectLongMap<V1>
sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumByLong, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.sumByLong.

Groups and sums the values using the two specified functions.

public double
sumOfDouble(DoubleFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfDouble.

Returns the final double result of evaluating function for each element of the iterable and adding the results together.

public double
sumOfFloat(FloatFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfFloat.

Returns the final double result of evaluating function for each element of the iterable and adding the results together.

public long
sumOfInt(IntFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfInt.

Returns the final long result of evaluating function for each element of the iterable and adding the results together.

public long
sumOfLong(LongFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfLong.

Returns the final long result of evaluating function for each element of the iterable and adding the results together.

public IntObjectHashMap<V>
tap(Procedure<? super V> procedure)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.tap.

Executes the Procedure for each element in the iterable and returns this.

public Object[]
toArray()

Overrides default org.eclipse.collections.api.RichIterable.toArray.

Converts this iterable to an array.

public <T> T[]
toArray(T[] a)

Overrides default org.eclipse.collections.api.RichIterable.toArray.

Converts this iterable to an array using the specified target array, assuming the target array is as long or longer than the iterable.

public MutableBag<V>
toBag()

Implements org.eclipse.collections.api.RichIterable.toBag.

Converts the collection to the default MutableBag implementation.

public <NK, NV> MutableBiMap<NK, NV>
toBiMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toBiMap.

Converts the collection to a BiMap implementation using the specified key and value functions.

public ImmutableIntObjectMap<V>
toImmutable()

Implements org.eclipse.collections.api.map.primitive.IntObjectMap.toImmutable.

Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.

public MutableList<V>
toList()

Implements org.eclipse.collections.api.RichIterable.toList.

Converts the collection to a MutableList implementation.

public <NK, NV> MutableMap<NK, NV>
toMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toMap.

Converts the collection to a MutableMap implementation using the specified key and value functions.

public MutableSet<V>
toSet()

Implements org.eclipse.collections.api.RichIterable.toSet.

Converts the collection to a MutableSet implementation.

public MutableSortedBag<V>
toSortedBag()

Implements org.eclipse.collections.api.RichIterable.toSortedBag.

Converts the collection to a MutableSortedBag implementation and sorts it using the natural order of the elements.

public MutableSortedBag<V>
toSortedBag(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.toSortedBag.

Converts the collection to the MutableSortedBag implementation and sorts it using the specified comparator.

public <NK, NV> MutableSortedMap<NK, NV>
toSortedMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toSortedMap.

Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the key elements' natural ordering.

public <NK, NV> MutableSortedMap<NK, NV>
toSortedMap(Comparator<? super NK> comparator, Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toSortedMap.

Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the given comparator.

public MutableSortedSet<V>
toSortedSet()

Implements org.eclipse.collections.api.RichIterable.toSortedSet.

Converts the collection to a MutableSortedSet implementation and sorts it using the natural order of the elements.

public MutableSortedSet<V>
toSortedSet(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.toSortedSet.

Converts the collection to a MutableSortedSet implementation and sorts it using the specified comparator.

public String
toString()

Overrides java.lang.Object.toString.

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.toString.

Returns a string with the keys and values of this map separated by commas with spaces and enclosed in curly braces.

public boolean
public V
updateValue(int key, Function0<? extends V> factory, Function<? super V, ? extends V> function)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.updateValue.

Look up the value associated with key, apply the function to it, and replace the value.

public <P> V
updateValueWith(int key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.updateValueWith.

Updates or sets the value associated with the key by applying the function to the existing value, if one exists, or the initial value supplied by the factory if one does not.

public Collection<V>
public IntObjectHashMap<V>
withKeysValues(int key1, V value1, int key2, V value2)

public IntObjectHashMap<V>
withKeysValues(int key1, V value1, int key2, V value2, int key3, V value3)

public IntObjectHashMap<V>
withKeysValues(int key1, V value1, int key2, V value2, int key3, V value3, int key4, V value4)

public IntObjectHashMap<V>
withKeyValue(int key, V value)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.withKeyValue.

Associates a value with the specified key.

public MutableIntObjectMap<V>
withoutAllKeys(IntIterable keys)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.withoutAllKeys.

Removes the mappings associated with all the keys, if they exist, from this map.

public MutableIntObjectMap<V>
withoutKey(int key)

Implements org.eclipse.collections.api.map.primitive.MutableIntObjectMap.withoutKey.

Removes the mapping associated with the key, if one exists, from this map.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

public <S> MutableBag<Pair<V, S>>
zip(Iterable<S> that)

Implements org.eclipse.collections.api.map.primitive.PrimitiveObjectMap.zip, org.eclipse.collections.api.map.primitive.MutablePrimitiveObjectMap.zip.

Deprecated in 7.0.

Returns a RichIterable formed from this RichIterable and another RichIterable by combining corresponding elements in pairs.

public <S, R extends Collection<Pair<V, S>>> R
zip(Iterable<S> that, R target)

Implements org.eclipse.collections.api.RichIterable.zip.

Same as zip(Iterable) but uses target for output.

public MutableSet<Pair<V, Integer>>
public <R extends Collection<Pair<V, Integer>>> R
zipWithIndex(R target)

Implements org.eclipse.collections.api.RichIterable.zipWithIndex.

Same as zipWithIndex() but uses target for output.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait