public class ShortIntHashMap extends AbstractMutableIntValuesMap implements MutableShortIntMap, Externalizable, MutableShortKeysMap
Constructor and Description |
---|
ShortIntHashMap() |
ShortIntHashMap(int initialCapacity) |
ShortIntHashMap(ShortIntMap map) |
Modifier and Type | Method and Description |
---|---|
int |
addToValue(short key,
int toBeAdded) |
MutableShortIntMap |
asSynchronized() |
MutableShortIntMap |
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(short key) |
boolean |
equals(Object obj)
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(ShortProcedure procedure) |
void |
forEachKeyValue(ShortIntProcedure procedure) |
int |
get(short key) |
int |
getIfAbsent(short key,
int ifAbsent) |
int |
getIfAbsentPut(short key,
int value) |
int |
getIfAbsentPut(short key,
IntFunction0 function) |
<P> int |
getIfAbsentPutWith(short key,
IntFunction<? super P> function,
P parameter) |
int |
getIfAbsentPutWithKey(short key,
ShortToIntFunction function) |
int |
getOrThrow(short key) |
int |
hashCode()
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
MutableIntIterator |
intIterator() |
MutableShortSet |
keySet() |
LazyShortIterable |
keysView() |
RichIterable<ShortIntPair> |
keyValuesView() |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1) |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1,
short key2,
int value2) |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3) |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3,
short key4,
int value4) |
void |
put(short key,
int value) |
void |
putAll(ShortIntMap map) |
void |
readExternal(ObjectInput in) |
ShortIntHashMap |
reject(ShortIntPredicate predicate) |
void |
remove(short key) |
void |
removeKey(short key) |
int |
removeKeyIfAbsent(short key,
int value) |
ShortIntHashMap |
select(ShortIntPredicate predicate) |
ImmutableShortIntMap |
toImmutable() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
int |
updateValue(short key,
int initialValueIfAbsent,
IntToIntFunction function) |
MutableIntCollection |
values() |
ShortIntHashMap |
withKeysValues(short key1,
int value1,
short key2,
int value2) |
ShortIntHashMap |
withKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3) |
ShortIntHashMap |
withKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3,
short key4,
int value4) |
ShortIntHashMap |
withKeyValue(short key1,
int value1) |
ShortIntHashMap |
withoutAllKeys(ShortIterable keys) |
ShortIntHashMap |
withoutKey(short 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 ShortIntHashMap()
public ShortIntHashMap(int initialCapacity)
public ShortIntHashMap(ShortIntMap map)
public static ShortIntHashMap newWithKeysValues(short key1, int value1)
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2)
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3)
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4)
public boolean equals(Object obj)
ShortIntMap
Map.equals(Object)
.equals
in interface ShortIntMap
equals
in class Object
public int hashCode()
ShortIntMap
Map.hashCode()
.hashCode
in interface ShortIntMap
hashCode
in class Object
public String toString()
PrimitiveIterable
toString
in interface ShortIntMap
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 MutableShortKeysMap
public void put(short key, int value)
put
in interface MutableShortIntMap
public void putAll(ShortIntMap map)
putAll
in interface MutableShortIntMap
public void removeKey(short key)
removeKey
in interface MutableShortIntMap
removeKey
in interface MutableShortKeysMap
public void remove(short key)
remove
in interface MutableShortIntMap
public int removeKeyIfAbsent(short key, int value)
removeKeyIfAbsent
in interface MutableShortIntMap
public int getIfAbsentPut(short key, int value)
getIfAbsentPut
in interface MutableShortIntMap
public int getIfAbsentPut(short key, IntFunction0 function)
getIfAbsentPut
in interface MutableShortIntMap
public <P> int getIfAbsentPutWith(short key, IntFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableShortIntMap
public int getIfAbsentPutWithKey(short key, ShortToIntFunction function)
getIfAbsentPutWithKey
in interface MutableShortIntMap
public int addToValue(short key, int toBeAdded)
addToValue
in interface MutableShortIntMap
public int updateValue(short key, int initialValueIfAbsent, IntToIntFunction function)
updateValue
in interface MutableShortIntMap
public ShortIntHashMap withKeyValue(short key1, int value1)
withKeyValue
in interface MutableShortIntMap
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2)
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3)
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4)
public ShortIntHashMap withoutKey(short key)
withoutKey
in interface MutableShortIntMap
public ShortIntHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys
in interface MutableShortIntMap
public MutableShortIntMap asUnmodifiable()
asUnmodifiable
in interface MutableShortIntMap
public MutableShortIntMap asSynchronized()
asSynchronized
in interface MutableShortIntMap
public ImmutableShortIntMap toImmutable()
toImmutable
in interface ShortIntMap
public int get(short key)
get
in interface ShortIntMap
public int getIfAbsent(short key, int ifAbsent)
getIfAbsent
in interface ShortIntMap
public int getOrThrow(short key)
getOrThrow
in interface ShortIntMap
public boolean containsKey(short key)
containsKey
in interface ShortIntMap
containsKey
in interface ShortKeysMap
public void forEachKey(ShortProcedure procedure)
forEachKey
in interface ShortIntMap
forEachKey
in interface ShortKeysMap
public void forEachKeyValue(ShortIntProcedure procedure)
forEachKeyValue
in interface ShortIntMap
public LazyShortIterable keysView()
keysView
in interface ShortIntMap
public RichIterable<ShortIntPair> keyValuesView()
keyValuesView
in interface ShortIntMap
public ShortIntHashMap select(ShortIntPredicate predicate)
select
in interface MutableShortIntMap
select
in interface ShortIntMap
public ShortIntHashMap reject(ShortIntPredicate predicate)
reject
in interface MutableShortIntMap
reject
in interface ShortIntMap
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 MutableShortSet keySet()
keySet
in interface ShortIntMap
public MutableIntCollection values()
values
in interface IntValuesMap
Copyright © 2004–2016. All rights reserved.