public class IntIntHashMap extends AbstractMutableIntValuesMap implements MutableIntIntMap, Externalizable, MutableIntKeysMap
Constructor and Description |
---|
IntIntHashMap() |
IntIntHashMap(int initialCapacity) |
IntIntHashMap(IntIntMap map) |
Modifier and Type | Method and 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(Object obj)
Follows the same general contract as
Map.equals(Object) . |
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() |
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()
Returns a string representation of this PrimitiveIterable.
|
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(ObjectOutput out) |
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
collect, reject, select
containsValue, forEachValue
allSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
isEmpty, notEmpty, size
public 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(Object obj)
IntIntMap
Map.equals(Object)
.public int hashCode()
IntIntMap
Map.hashCode()
.public String toString()
PrimitiveIterable
toString
in interface IntIntMap
toString
in interface PrimitiveIterable
toString
in class AbstractIntIterable
public MutableIntIterator intIterator()
intIterator
in interface IntIterable
intIterator
in interface MutableIntValuesMap
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto
in interface IntIterable
public void clear()
clear
in interface MutableIntValuesMap
clear
in interface MutableIntKeysMap
public void put(int key, int value)
put
in interface MutableIntIntMap
public void putAll(IntIntMap map)
putAll
in interface MutableIntIntMap
public void removeKey(int key)
removeKey
in interface MutableIntIntMap
removeKey
in interface MutableIntKeysMap
public void remove(int key)
remove
in interface MutableIntIntMap
public int removeKeyIfAbsent(int key, int value)
removeKeyIfAbsent
in interface MutableIntIntMap
public int getIfAbsentPut(int key, int value)
getIfAbsentPut
in interface MutableIntIntMap
public int getIfAbsentPut(int key, IntFunction0 function)
getIfAbsentPut
in interface MutableIntIntMap
public <P> int getIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableIntIntMap
public int getIfAbsentPutWithKey(int key, IntToIntFunction function)
getIfAbsentPutWithKey
in interface MutableIntIntMap
public int addToValue(int key, int toBeAdded)
addToValue
in interface MutableIntIntMap
public int updateValue(int key, int initialValueIfAbsent, IntToIntFunction function)
updateValue
in interface MutableIntIntMap
public IntIntHashMap withKeyValue(int key1, int value1)
withKeyValue
in interface MutableIntIntMap
public 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 MutableIntIntMap
public IntIntHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys
in interface MutableIntIntMap
public MutableIntIntMap asUnmodifiable()
asUnmodifiable
in interface MutableIntIntMap
public MutableIntIntMap asSynchronized()
asSynchronized
in interface MutableIntIntMap
public ImmutableIntIntMap toImmutable()
toImmutable
in interface IntIntMap
public int getIfAbsent(int key, int ifAbsent)
getIfAbsent
in interface IntIntMap
public int getOrThrow(int key)
getOrThrow
in interface IntIntMap
public boolean containsKey(int key)
containsKey
in interface IntIntMap
containsKey
in interface IntKeysMap
public void forEachKey(IntProcedure procedure)
forEachKey
in interface IntIntMap
forEachKey
in interface IntKeysMap
public void forEachKeyValue(IntIntProcedure procedure)
forEachKeyValue
in interface IntIntMap
public LazyIntIterable keysView()
public RichIterable<IntIntPair> keyValuesView()
keyValuesView
in interface IntIntMap
public IntIntHashMap select(IntIntPredicate predicate)
select
in interface IntIntMap
select
in interface MutableIntIntMap
public IntIntHashMap reject(IntIntPredicate predicate)
reject
in interface IntIntMap
reject
in interface MutableIntIntMap
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void compact()
public MutableIntSet keySet()
public MutableIntCollection values()
values
in interface IntValuesMap
Copyright © 2004–2016. All rights reserved.