public class ShortLongHashMap extends AbstractMutableLongValuesMap implements MutableShortLongMap, Externalizable, MutableShortKeysMap
Constructor and Description |
---|
ShortLongHashMap() |
ShortLongHashMap(int initialCapacity) |
ShortLongHashMap(ShortLongMap map) |
Modifier and Type | Method and Description |
---|---|
long |
addToValue(short key,
long toBeAdded) |
MutableShortLongMap |
asSynchronized() |
MutableShortLongMap |
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(ShortLongProcedure procedure) |
long |
get(short key) |
long |
getIfAbsent(short key,
long ifAbsent) |
long |
getIfAbsentPut(short key,
long value) |
long |
getIfAbsentPut(short key,
LongFunction0 function) |
<P> long |
getIfAbsentPutWith(short key,
LongFunction<? super P> function,
P parameter) |
long |
getIfAbsentPutWithKey(short key,
ShortToLongFunction function) |
long |
getOrThrow(short key) |
int |
hashCode()
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function) |
MutableShortSet |
keySet() |
LazyShortIterable |
keysView() |
RichIterable<ShortLongPair> |
keyValuesView() |
MutableLongIterator |
longIterator() |
static ShortLongHashMap |
newWithKeysValues(short key1,
long value1) |
static ShortLongHashMap |
newWithKeysValues(short key1,
long value1,
short key2,
long value2) |
static ShortLongHashMap |
newWithKeysValues(short key1,
long value1,
short key2,
long value2,
short key3,
long value3) |
static ShortLongHashMap |
newWithKeysValues(short key1,
long value1,
short key2,
long value2,
short key3,
long value3,
short key4,
long value4) |
void |
put(short key,
long value) |
void |
putAll(ShortLongMap map) |
void |
readExternal(ObjectInput in) |
ShortLongHashMap |
reject(ShortLongPredicate predicate) |
void |
remove(short key) |
void |
removeKey(short key) |
long |
removeKeyIfAbsent(short key,
long value) |
ShortLongHashMap |
select(ShortLongPredicate predicate) |
ImmutableShortLongMap |
toImmutable() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
long |
updateValue(short key,
long initialValueIfAbsent,
LongToLongFunction function) |
MutableLongCollection |
values() |
ShortLongHashMap |
withKeysValues(short key1,
long value1,
short key2,
long value2) |
ShortLongHashMap |
withKeysValues(short key1,
long value1,
short key2,
long value2,
short key3,
long value3) |
ShortLongHashMap |
withKeysValues(short key1,
long value1,
short key2,
long value2,
short key3,
long value3,
short key4,
long value4) |
ShortLongHashMap |
withKeyValue(short key1,
long value1) |
ShortLongHashMap |
withoutAllKeys(ShortIterable keys) |
ShortLongHashMap |
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
appendString, appendString, asLazy, average, containsAll, makeString, makeString, makeString, 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, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
isEmpty, notEmpty, size
public ShortLongHashMap()
public ShortLongHashMap(int initialCapacity)
public ShortLongHashMap(ShortLongMap map)
public static ShortLongHashMap newWithKeysValues(short key1, long value1)
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2)
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3)
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4)
public boolean equals(Object obj)
ShortLongMap
Map.equals(Object)
.equals
in interface ShortLongMap
equals
in class Object
public int hashCode()
ShortLongMap
Map.hashCode()
.hashCode
in interface ShortLongMap
hashCode
in class Object
public String toString()
PrimitiveIterable
toString
in interface ShortLongMap
toString
in interface PrimitiveIterable
toString
in class AbstractLongIterable
public MutableLongIterator longIterator()
longIterator
in interface LongIterable
longIterator
in interface MutableLongValuesMap
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)
injectInto
in interface LongIterable
public void clear()
clear
in interface MutableLongValuesMap
clear
in interface MutableShortKeysMap
public void put(short key, long value)
put
in interface MutableShortLongMap
public void putAll(ShortLongMap map)
putAll
in interface MutableShortLongMap
public void removeKey(short key)
removeKey
in interface MutableShortLongMap
removeKey
in interface MutableShortKeysMap
public void remove(short key)
remove
in interface MutableShortLongMap
public long removeKeyIfAbsent(short key, long value)
removeKeyIfAbsent
in interface MutableShortLongMap
public long getIfAbsentPut(short key, long value)
getIfAbsentPut
in interface MutableShortLongMap
public long getIfAbsentPut(short key, LongFunction0 function)
getIfAbsentPut
in interface MutableShortLongMap
public <P> long getIfAbsentPutWith(short key, LongFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableShortLongMap
public long getIfAbsentPutWithKey(short key, ShortToLongFunction function)
getIfAbsentPutWithKey
in interface MutableShortLongMap
public long addToValue(short key, long toBeAdded)
addToValue
in interface MutableShortLongMap
public long updateValue(short key, long initialValueIfAbsent, LongToLongFunction function)
updateValue
in interface MutableShortLongMap
public ShortLongHashMap withKeyValue(short key1, long value1)
withKeyValue
in interface MutableShortLongMap
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2)
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3)
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4)
public ShortLongHashMap withoutKey(short key)
withoutKey
in interface MutableShortLongMap
public ShortLongHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys
in interface MutableShortLongMap
public MutableShortLongMap asUnmodifiable()
asUnmodifiable
in interface MutableShortLongMap
public MutableShortLongMap asSynchronized()
asSynchronized
in interface MutableShortLongMap
public ImmutableShortLongMap toImmutable()
toImmutable
in interface ShortLongMap
public long get(short key)
get
in interface ShortLongMap
public long getIfAbsent(short key, long ifAbsent)
getIfAbsent
in interface ShortLongMap
public long getOrThrow(short key)
getOrThrow
in interface ShortLongMap
public boolean containsKey(short key)
containsKey
in interface ShortLongMap
containsKey
in interface ShortKeysMap
public void forEachKey(ShortProcedure procedure)
forEachKey
in interface ShortLongMap
forEachKey
in interface ShortKeysMap
public void forEachKeyValue(ShortLongProcedure procedure)
forEachKeyValue
in interface ShortLongMap
public LazyShortIterable keysView()
keysView
in interface ShortLongMap
public RichIterable<ShortLongPair> keyValuesView()
keyValuesView
in interface ShortLongMap
public ShortLongHashMap select(ShortLongPredicate predicate)
select
in interface MutableShortLongMap
select
in interface ShortLongMap
public ShortLongHashMap reject(ShortLongPredicate predicate)
reject
in interface MutableShortLongMap
reject
in interface ShortLongMap
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 ShortLongMap
public MutableLongCollection values()
values
in interface LongValuesMap
Copyright © 2004–2016. All rights reserved.