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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntIntHashMap()IntIntHashMap(int initialCapacity)IntIntHashMap(IntIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaddToValue(int key, int toBeAdded)MutableIntIntMapasSynchronized()MutableIntIntMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(int key)booleanequals(Object obj)MutableIntIntMapflipUniqueValues()voidforEachKey(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)MutableIntIteratorintIterator()MutableIntSetkeySet()LazyIntIterablekeysView()RichIterable<IntIntPair>keyValuesView()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)voidputAll(IntIntMap map)voidreadExternal(ObjectInput in)IntIntHashMapreject(IntIntPredicate predicate)voidremove(int key)voidremoveKey(int key)intremoveKeyIfAbsent(int key, int value)IntIntHashMapselect(IntIntPredicate predicate)ImmutableIntIntMaptoImmutable()StringtoString()booleantrimToSize()intupdateValue(int key, int initialValueIfAbsent, IntToIntFunction function)voidupdateValues(IntIntToIntFunction function)MutableIntCollectionvalues()IntIntHashMapwithKeysValues(int key1, int value1, int key2, int value2)IntIntHashMapwithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3)IntIntHashMapwithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4)IntIntHashMapwithKeyValue(int key1, int value1)IntIntHashMapwithoutAllKeys(IntIterable keys)IntIntHashMapwithoutKey(int key)voidwriteExternal(ObjectOutput out)-
Methods 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, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntIntMap
injectIntoKeyValue
-
Methods 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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.IntKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntIntMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
IntIntHashMap
public IntIntHashMap()
-
IntIntHashMap
public IntIntHashMap(int initialCapacity)
-
IntIntHashMap
public IntIntHashMap(IntIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static IntIntHashMap newWithKeysValues(int key1, int value1)
-
newWithKeysValues
public static IntIntHashMap newWithKeysValues(int key1, int value1, int key2, int value2)
-
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
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
toString
public String toString()
- Specified by:
toStringin interfaceIntIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)- 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
public void putAll(IntIntMap map)
- Specified by:
putAllin interfaceMutableIntIntMap
-
updateValues
public void updateValues(IntIntToIntFunction function)
- 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
public int getIfAbsentPut(int key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableIntIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableIntIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(int key, IntToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntIntMap
-
addToValue
public int addToValue(int key, int toBeAdded)- Specified by:
addToValuein interfaceMutableIntIntMap
-
updateValue
public int updateValue(int key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableIntIntMap
-
withKeyValue
public IntIntHashMap withKeyValue(int key1, int value1)
- Specified by:
withKeyValuein interfaceMutableIntIntMap
-
withKeysValues
public IntIntHashMap withKeysValues(int key1, int value1, int key2, int value2)
-
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
public IntIntHashMap withoutKey(int key)
- Specified by:
withoutKeyin interfaceMutableIntIntMap
-
withoutAllKeys
public IntIntHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableIntIntMap
-
asUnmodifiable
public MutableIntIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntIntMap
-
asSynchronized
public MutableIntIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntIntMap
-
toImmutable
public ImmutableIntIntMap toImmutable()
- Specified by:
toImmutablein interfaceIntIntMap
-
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
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKeyin interfaceIntIntMap- Specified by:
forEachKeyin interfaceIntKeysMap
-
forEachKeyValue
public void forEachKeyValue(IntIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceIntIntMap
-
keysView
public LazyIntIterable keysView()
-
keyValuesView
public RichIterable<IntIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceIntIntMap
-
flipUniqueValues
public MutableIntIntMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceIntIntMap- Specified by:
flipUniqueValuesin interfaceMutableIntIntMap
-
select
public IntIntHashMap select(IntIntPredicate predicate)
- Specified by:
selectin interfaceIntIntMap- Specified by:
selectin interfaceMutableIntIntMap
-
reject
public IntIntHashMap reject(IntIntPredicate predicate)
- Specified by:
rejectin interfaceIntIntMap- Specified by:
rejectin interfaceMutableIntIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void 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
public MutableIntSet keySet()
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
-