public static class Short2LongMaps.SynchronizedMap extends AbstractShort2LongMap implements Short2LongMap
AbstractShort2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2LongMap.Entry, Short2LongMap.FastEntrySet| Modifier and Type | Method and Description |
|---|---|
long |
addTo(short key,
long value)
A Helper method to add a primitives together.
|
void |
addToAll(Short2LongMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Long |
compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
long |
computeLong(short key,
ShortLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(short key,
Short2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(short key,
ShortLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(long value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Short,? super java.lang.Long> action)
Deprecated.
|
void |
forEach(ShortLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key)
Deprecated.
|
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getLong(short key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
Deprecated.
|
long |
getOrDefault(short key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
java.lang.Long |
merge(java.lang.Short key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
void |
mergeAllLong(Short2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(short key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
long |
put(short key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Long |
put(java.lang.Short key,
java.lang.Long value)
Deprecated.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Long> m) |
void |
putAll(short[] keys,
long[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Short2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAllIfAbsent(Short2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
long |
putIfAbsent(short key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Long |
putIfAbsent(java.lang.Short key,
java.lang.Long value)
Deprecated.
|
java.lang.Long |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
boolean |
remove(short key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
remShort(short key)
Type Specific remove function to reduce boxing/unboxing
|
long |
remShortOrDefault(short key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
replace(short key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Long |
replace(java.lang.Short key,
java.lang.Long value)
Deprecated.
|
boolean |
replace(short key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Short key,
java.lang.Long oldValue,
java.lang.Long newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
void |
replaceLongs(Short2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(ShortLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractShort2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
ObjectSet<Short2LongMap.Entry> |
short2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
LongCollection |
values() |
entrySet, equals, hashCodeentrySet, putAllpublic long getDefaultReturnValue()
Short2LongMapgetDefaultReturnValue in interface Short2LongMapgetDefaultReturnValue in class AbstractShort2LongMappublic AbstractShort2LongMap setDefaultReturnValue(long v)
Short2LongMapsetDefaultReturnValue in interface Short2LongMapsetDefaultReturnValue in class AbstractShort2LongMapv - value that should be the default return valuepublic long put(short key,
long value)
Short2LongMapput in interface Short2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(short key,
long value)
Short2LongMapputIfAbsent in interface Short2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Short2LongMap m)
Short2LongMapputAllIfAbsent in interface Short2LongMapputAllIfAbsent in class AbstractShort2LongMapm - elements that should be added if not present.public long addTo(short key,
long value)
Short2LongMapaddTo in interface Short2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic void addToAll(Short2LongMap m)
Short2LongMapaddToAll in interface Short2LongMapaddToAll in class AbstractShort2LongMapm - the values that should be added/insertedpublic void putAll(Short2LongMap m)
Short2LongMapputAll in interface Short2LongMapputAll in class AbstractShort2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Short,java.lang.Long>putAll in class AbstractShort2LongMappublic void putAll(short[] keys,
long[] values,
int offset,
int size)
Short2LongMapputAll in interface Short2LongMapputAll in class AbstractShort2LongMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public boolean containsKey(short key)
Short2LongMapcontainsKey in interface Short2LongMapcontainsKey in class AbstractShort2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Short2LongMapcontainsValue in interface Short2LongMapcontainsValue in class AbstractShort2LongMapvalue - element that is searched forpublic long getLong(short key)
Short2LongMapgetLong in interface Short2LongFunctiongetLong in interface Short2LongMapkey - the key that is searched forpublic long remShort(short key)
Short2LongMapremShort in interface Short2LongMapkey - the element that should be removedpublic long remShortOrDefault(short key,
long defaultValue)
Short2LongMapremShortOrDefault in interface Short2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
long value)
Short2LongMapremove in interface Short2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
long oldValue,
long newValue)
Short2LongMapreplace in interface Short2LongMapreplace in class AbstractShort2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(short key,
long value)
Short2LongMapreplace in interface Short2LongMapreplace in class AbstractShort2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Short2LongMap m)
Short2LongMapreplaceLongs in interface Short2LongMapreplaceLongs in class AbstractShort2LongMapm - elements that should be replaced.public void replaceLongs(ShortLongUnaryOperator mappingFunction)
Short2LongMapreplaceLongs in interface Short2LongMapreplaceLongs in class AbstractShort2LongMapmappingFunction - operation to replace all valuespublic long computeLong(short key,
ShortLongUnaryOperator mappingFunction)
Short2LongMapcomputeLong in interface Short2LongMapcomputeLong in class AbstractShort2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(short key,
Short2LongFunction mappingFunction)
Short2LongMapcomputeLongIfAbsent in interface Short2LongMapcomputeLongIfAbsent in class AbstractShort2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(short key,
ShortLongUnaryOperator mappingFunction)
Short2LongMapcomputeLongIfPresent in interface Short2LongMapcomputeLongIfPresent in class AbstractShort2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(short key,
long value,
LongLongUnaryOperator mappingFunction)
Short2LongMapmergeLong in interface Short2LongMapmergeLong in class AbstractShort2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Short2LongMap m, LongLongUnaryOperator mappingFunction)
Short2LongMapmergeAllLong in interface Short2LongMapmergeAllLong in class AbstractShort2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic long getOrDefault(short key,
long defaultValue)
Short2LongMapgetOrDefault in interface Short2LongMapgetOrDefault in class AbstractShort2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ShortLongConsumer action)
Short2LongMapforEach in interface Short2LongMapforEach in class AbstractShort2LongMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Long>size in class java.util.AbstractMap<java.lang.Short,java.lang.Long>public ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Long>keySet in interface Short2LongMapkeySet in class AbstractShort2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Long>values in interface Short2LongMapvalues in class AbstractShort2LongMappublic ObjectSet<Short2LongMap.Entry> short2LongEntrySet()
Short2LongMapshort2LongEntrySet in interface Short2LongMap@Deprecated public java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Short,java.lang.Long>get in interface Short2LongMapget in class AbstractShort2LongMap@Deprecated
public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Short,java.lang.Long>getOrDefault in interface Short2LongMapgetOrDefault in class AbstractShort2LongMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Short,java.lang.Long>containsValue in interface Short2LongMapcontainsValue in class java.util.AbstractMap<java.lang.Short,java.lang.Long>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Short,java.lang.Long>containsKey in interface Short2LongMapcontainsKey in class java.util.AbstractMap<java.lang.Short,java.lang.Long>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Long put(java.lang.Short key,
java.lang.Long value)
put in interface java.util.Map<java.lang.Short,java.lang.Long>put in interface Short2LongMapput in class java.util.AbstractMap<java.lang.Short,java.lang.Long>@Deprecated public java.lang.Long remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Short,java.lang.Long>remove in interface Short2LongMapremove in class java.util.AbstractMap<java.lang.Short,java.lang.Long>key - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Long>@Deprecated
public java.lang.Long putIfAbsent(java.lang.Short key,
java.lang.Long value)
putIfAbsent in interface java.util.Map<java.lang.Short,java.lang.Long>putIfAbsent in interface Short2LongMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Short,java.lang.Long>remove in interface Short2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Short key,
java.lang.Long oldValue,
java.lang.Long newValue)
replace in interface java.util.Map<java.lang.Short,java.lang.Long>replace in interface Short2LongMap@Deprecated
public java.lang.Long replace(java.lang.Short key,
java.lang.Long value)
replace in interface java.util.Map<java.lang.Short,java.lang.Long>replace in interface Short2LongMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Short,java.lang.Long>replaceAll in interface Short2LongMap@Deprecated
public java.lang.Long compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
compute in interface java.util.Map<java.lang.Short,java.lang.Long>compute in interface Short2LongMap@Deprecated
public java.lang.Long computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends java.lang.Long> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Short,java.lang.Long>computeIfAbsent in interface Short2LongMap@Deprecated
public java.lang.Long computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Short,java.lang.Long>computeIfPresent in interface Short2LongMap@Deprecated
public java.lang.Long merge(java.lang.Short key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
merge in interface java.util.Map<java.lang.Short,java.lang.Long>merge in interface Short2LongMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Short,? super java.lang.Long> action)
forEach in interface java.util.Map<java.lang.Short,java.lang.Long>forEach in interface Short2LongMap