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 int
addToValue(int key, int toBeAdded)
MutableIntIntMap
asSynchronized()
MutableIntIntMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(int key)
boolean
equals(Object obj)
MutableIntIntMap
flipUniqueValues()
void
forEachKey(IntProcedure procedure)
void
forEachKeyValue(IntIntProcedure procedure)
int
get(int key)
int
getAndPut(int key, int putValue, int defaultValue)
int
getIfAbsent(int key, int ifAbsent)
int
getIfAbsentPut(int key, int value)
int
getIfAbsentPut(int key, IntFunction0 function)
<P> int
getIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter)
int
getIfAbsentPutWithKey(int key, IntToIntFunction function)
int
getOrThrow(int key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
MutableIntIterator
intIterator()
MutableIntSet
keySet()
LazyIntIterable
keysView()
RichIterable<IntIntPair>
keyValuesView()
static IntIntHashMap
newWithKeysValues(int key1, int value1)
static IntIntHashMap
newWithKeysValues(int key1, int value1, int key2, int value2)
static IntIntHashMap
newWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3)
static IntIntHashMap
newWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4)
void
put(int key, int value)
void
putAll(IntIntMap map)
void
readExternal(ObjectInput in)
IntIntHashMap
reject(IntIntPredicate predicate)
void
remove(int key)
void
removeKey(int key)
int
removeKeyIfAbsent(int key, int value)
IntIntHashMap
select(IntIntPredicate predicate)
ImmutableIntIntMap
toImmutable()
String
toString()
boolean
trimToSize()
int
updateValue(int key, int initialValueIfAbsent, IntToIntFunction function)
void
updateValues(IntIntToIntFunction function)
MutableIntCollection
values()
IntIntHashMap
withKeysValues(int key1, int value1, int key2, int value2)
IntIntHashMap
withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3)
IntIntHashMap
withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4)
IntIntHashMap
withKeyValue(int key1, int value1)
IntIntHashMap
withoutAllKeys(IntIterable keys)
IntIntHashMap
withoutKey(int key)
void
writeExternal(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:
toString
in interfaceIntIntMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceIntIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntKeysMap
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(int key, int value)
- Specified by:
put
in interfaceMutableIntIntMap
-
putAll
public void putAll(IntIntMap map)
- Specified by:
putAll
in interfaceMutableIntIntMap
-
updateValues
public void updateValues(IntIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableIntIntMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKey
in interfaceMutableIntIntMap
- Specified by:
removeKey
in interfaceMutableIntKeysMap
-
remove
public void remove(int key)
- Specified by:
remove
in interfaceMutableIntIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(int key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableIntIntMap
-
getIfAbsentPut
public int getIfAbsentPut(int key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableIntIntMap
-
getAndPut
public int getAndPut(int key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableIntIntMap
-
getIfAbsentPut
public int getIfAbsentPut(int key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableIntIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableIntIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(int key, IntToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableIntIntMap
-
addToValue
public int addToValue(int key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableIntIntMap
-
updateValue
public int updateValue(int key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableIntIntMap
-
withKeyValue
public IntIntHashMap withKeyValue(int key1, int value1)
- Specified by:
withKeyValue
in 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:
withoutKey
in interfaceMutableIntIntMap
-
withoutAllKeys
public IntIntHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableIntIntMap
-
asUnmodifiable
public MutableIntIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntIntMap
-
asSynchronized
public MutableIntIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntIntMap
-
toImmutable
public ImmutableIntIntMap toImmutable()
- Specified by:
toImmutable
in interfaceIntIntMap
-
getIfAbsent
public int getIfAbsent(int key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceIntIntMap
-
getOrThrow
public int getOrThrow(int key)
- Specified by:
getOrThrow
in interfaceIntIntMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interfaceIntIntMap
- Specified by:
containsKey
in interfaceIntKeysMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKey
in interfaceIntIntMap
- Specified by:
forEachKey
in interfaceIntKeysMap
-
forEachKeyValue
public void forEachKeyValue(IntIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceIntIntMap
-
keysView
public LazyIntIterable keysView()
-
keyValuesView
public RichIterable<IntIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceIntIntMap
-
flipUniqueValues
public MutableIntIntMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceIntIntMap
- Specified by:
flipUniqueValues
in interfaceMutableIntIntMap
-
select
public IntIntHashMap select(IntIntPredicate predicate)
- Specified by:
select
in interfaceIntIntMap
- Specified by:
select
in interfaceMutableIntIntMap
-
reject
public IntIntHashMap reject(IntIntPredicate predicate)
- Specified by:
reject
in interfaceIntIntMap
- Specified by:
reject
in interfaceMutableIntIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
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:
values
in interfaceIntValuesMap
-
-