java.io.Externalizable, java.io.Serializable, IntIterable, IntIntMap, IntValuesMap, MutableIntIntMap, MutableIntValuesMap, PrimitiveIterable, MutableIntKeysMap, IntKeysMappublic class IntIntHashMap extends AbstractMutableIntValuesMap implements MutableIntIntMap, java.io.Externalizable, MutableIntKeysMap
| Constructor | Description |
|---|---|
IntIntHashMap() |
|
IntIntHashMap(int initialCapacity) |
|
IntIntHashMap(IntIntMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
addToValue(int key,
int toBeAdded) |
|
MutableIntIntMap |
asSynchronized() |
|
MutableIntIntMap |
asUnmodifiable() |
|
void |
clear() |
|
void |
compact() |
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
containsKey(int key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableIntIntMap |
flipUniqueValues() |
Return the IntIntMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(IntProcedure procedure) |
|
void |
forEachKeyValue(IntIntProcedure procedure) |
|
int |
get(int key) |
|
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() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
|
MutableIntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
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(java.io.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() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
int |
updateValue(int key,
int initialValueIfAbsent,
IntToIntFunction 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(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListisEmpty, notEmpty, sizecontainsValue, forEachValue, tapputPaircollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic IntIntHashMap()
public IntIntHashMap(int initialCapacity)
public IntIntHashMap(IntIntMap map)
public static IntIntHashMap newWithKeysValues(int key1, int value1)
public static IntIntHashMap newWithKeysValues(int key1, int value1, int key2, int value2)
public static IntIntHashMap newWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3)
public static IntIntHashMap newWithKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4)
public boolean equals(java.lang.Object obj)
IntIntMapMap.equals(Object).public int hashCode()
IntIntMapMap.hashCode().public java.lang.String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString in interface IntIntMaptoString in interface PrimitiveIterabletoString in class AbstractIntIterableAbstractCollection.toString()public MutableIntIterator intIterator()
IntIterableintIterator in interface IntIterableintIterator in interface MutableIntValuesMappublic <V> V injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface IntIterablepublic void clear()
clear in interface MutableIntKeysMapclear in interface MutableIntValuesMappublic void put(int key,
int value)
put in interface MutableIntIntMappublic void putAll(IntIntMap map)
putAll in interface MutableIntIntMappublic void removeKey(int key)
removeKey in interface MutableIntIntMapremoveKey in interface MutableIntKeysMappublic void remove(int key)
remove in interface MutableIntIntMappublic int removeKeyIfAbsent(int key,
int value)
removeKeyIfAbsent in interface MutableIntIntMappublic int getIfAbsentPut(int key,
int value)
getIfAbsentPut in interface MutableIntIntMappublic int getIfAbsentPut(int key,
IntFunction0 function)
getIfAbsentPut in interface MutableIntIntMappublic <P> int getIfAbsentPutWith(int key,
IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntIntMappublic int getIfAbsentPutWithKey(int key,
IntToIntFunction function)
getIfAbsentPutWithKey in interface MutableIntIntMappublic int addToValue(int key,
int toBeAdded)
addToValue in interface MutableIntIntMappublic int updateValue(int key,
int initialValueIfAbsent,
IntToIntFunction function)
updateValue in interface MutableIntIntMappublic IntIntHashMap withKeyValue(int key1, int value1)
withKeyValue in interface MutableIntIntMappublic IntIntHashMap withKeysValues(int key1, int value1, int key2, int value2)
public IntIntHashMap withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3)
public IntIntHashMap withKeysValues(int key1, int value1, int key2, int value2, int key3, int value3, int key4, int value4)
public IntIntHashMap withoutKey(int key)
withoutKey in interface MutableIntIntMappublic IntIntHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntIntMappublic MutableIntIntMap asUnmodifiable()
asUnmodifiable in interface MutableIntIntMappublic MutableIntIntMap asSynchronized()
asSynchronized in interface MutableIntIntMappublic ImmutableIntIntMap toImmutable()
toImmutable in interface IntIntMappublic int getIfAbsent(int key,
int ifAbsent)
getIfAbsent in interface IntIntMappublic int getOrThrow(int key)
getOrThrow in interface IntIntMappublic boolean containsKey(int key)
containsKey in interface IntIntMapcontainsKey in interface IntKeysMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntIntMapforEachKey in interface IntKeysMappublic void forEachKeyValue(IntIntProcedure procedure)
forEachKeyValue in interface IntIntMappublic LazyIntIterable keysView()
public RichIterable<IntIntPair> keyValuesView()
keyValuesView in interface IntIntMappublic MutableIntIntMap flipUniqueValues()
IntIntMapflipUniqueValues in interface IntIntMapflipUniqueValues in interface MutableIntIntMappublic IntIntHashMap select(IntIntPredicate predicate)
select in interface IntIntMapselect in interface MutableIntIntMappublic IntIntHashMap reject(IntIntPredicate predicate)
reject in interface IntIntMapreject in interface MutableIntIntMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void compact()
public MutableIntSet keySet()
public MutableIntCollection values()
values in interface IntValuesMapCopyright © 2004–2018. All rights reserved.