Class IntIntHashMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
org.eclipse.collections.impl.map.mutable.primitive.IntIntHashMap
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,IntIntMap,IntValuesMap,MutableIntIntMap,MutableIntValuesMap,PrimitiveIterable,MutableIntKeysMap,IntKeysMap
public class IntIntHashMap
extends AbstractMutableIntValuesMap
implements MutableIntIntMap, Externalizable, MutableIntKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddToValue(int key, int toBeAdded) booleanallSatisfyKeyValue(IntIntPredicate predicate) voidclear()voidcompact()Deprecated.booleancontainsKey(int key) booleanvoidforEachKey(IntProcedure procedure) voidforEachKeyValue(IntIntProcedure procedure) intget(int key) intgetAndPut(int key, int putValue, int defaultValue) intgetIfAbsent(int key, int ifAbsent) intgetIfAbsentPut(int key, int value) intgetIfAbsentPut(int key, IntFunction0 function) <P> intgetIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter) intgetIfAbsentPutWithKey(int key, IntToIntFunction function) intgetOrThrow(int key) inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V, ? extends V> function) keySet()keysView()static IntIntHashMapnewWithKeysValues(int key1, int value1) static IntIntHashMapnewWithKeysValues(int key1, int value1, int key2, int value2) static IntIntHashMapnewWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3) static IntIntHashMapnewWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4) voidput(int key, int value) voidvoidreject(IntIntPredicate predicate) voidremove(int key) voidremoveKey(int key) intremoveKeyIfAbsent(int key, int value) select(IntIntPredicate predicate) toString()booleanintupdateValue(int key, int initialValueIfAbsent, IntToIntFunction function) voidupdateValues(IntIntToIntFunction function) values()withKeysValues(int key1, int value1, int key2, int value2) withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3) withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4) withKeyValue(int key1, int value1) withoutAllKeys(IntIterable keys) withoutKey(int key) voidMethods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArrayMethods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListMethods inherited from interface org.eclipse.collections.api.map.primitive.IntIntMap
injectIntoKeyValueMethods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.impl.map.primitive.IntKeysMap
isEmpty, notEmpty, sizeMethods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tapMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntIntMap
putPair, withAllKeyValuesMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, selectMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Constructor Details
-
IntIntHashMap
public IntIntHashMap() -
IntIntHashMap
public IntIntHashMap(int initialCapacity) -
IntIntHashMap
-
-
Method Details
-
newWithKeysValues
-
newWithKeysValues
-
newWithKeysValues
public static IntIntHashMap newWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3) -
newWithKeysValues
public static IntIntHashMap newWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4) -
equals
-
hashCode
public int hashCode() -
toString
- Specified by:
toStringin interfaceIntIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableIntKeysMap- Specified by:
clearin interfaceMutableIntValuesMap
-
put
public void put(int key, int value) - Specified by:
putin interfaceMutableIntIntMap
-
putAll
- Specified by:
putAllin interfaceMutableIntIntMap
-
updateValues
- Specified by:
updateValuesin interfaceMutableIntIntMap
-
removeKey
public void removeKey(int key) - Specified by:
removeKeyin interfaceMutableIntIntMap- Specified by:
removeKeyin interfaceMutableIntKeysMap
-
remove
public void remove(int key) - Specified by:
removein interfaceMutableIntIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(int key, int value) - Specified by:
removeKeyIfAbsentin interfaceMutableIntIntMap
-
getIfAbsentPut
public int getIfAbsentPut(int key, int value) - Specified by:
getIfAbsentPutin interfaceMutableIntIntMap
-
getAndPut
public int getAndPut(int key, int putValue, int defaultValue) - Specified by:
getAndPutin interfaceMutableIntIntMap
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableIntIntMap
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableIntIntMap
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntIntMap
-
addToValue
public int addToValue(int key, int toBeAdded) - Specified by:
addToValuein interfaceMutableIntIntMap
-
updateValue
- Specified by:
updateValuein interfaceMutableIntIntMap
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableIntIntMap
-
withKeysValues
-
withKeysValues
public IntIntHashMap withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3) -
withKeysValues
public IntIntHashMap withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4) -
withoutKey
- Specified by:
withoutKeyin interfaceMutableIntIntMap
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableIntIntMap
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableIntIntMap
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableIntIntMap
-
toImmutable
- Specified by:
toImmutablein interfaceIntIntMap
-
get
public int get(int key) -
getIfAbsent
public int getIfAbsent(int key, int ifAbsent) - Specified by:
getIfAbsentin interfaceIntIntMap
-
getOrThrow
public int getOrThrow(int key) - Specified by:
getOrThrowin interfaceIntIntMap
-
containsKey
public boolean containsKey(int key) - Specified by:
containsKeyin interfaceIntIntMap- Specified by:
containsKeyin interfaceIntKeysMap
-
forEachKey
- Specified by:
forEachKeyin interfaceIntIntMap- Specified by:
forEachKeyin interfaceIntKeysMap
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceIntIntMap
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceIntIntMap- Since:
- 12.0
-
keysView
-
keyValuesView
- Specified by:
keyValuesViewin interfaceIntIntMap
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceIntIntMap- Specified by:
flipUniqueValuesin interfaceMutableIntIntMap
-
select
- Specified by:
selectin interfaceIntIntMap- Specified by:
selectin interfaceMutableIntIntMap
-
reject
- Specified by:
rejectin interfaceIntIntMap- Specified by:
rejectin interfaceMutableIntIntMap
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
compact
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels. -
keySet
-
values
- Specified by:
valuesin interfaceIntValuesMap
-
trimToSize()instead