public static class Long2ShortMaps.SynchronizedMap extends AbstractLong2ShortMap implements Long2ShortMap
AbstractLong2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ShortMap.Entry, Long2ShortMap.FastEntrySet| Modifier and Type | Method and Description |
|---|---|
short |
addTo(long key,
short value)
A Helper method to add a primitives together.
|
void |
addToAll(Long2ShortMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Short |
compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
java.lang.Short |
computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Short> mappingFunction)
Deprecated.
|
java.lang.Short |
computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
short |
computeShort(long key,
LongShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(long key,
Long2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(long key,
LongShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Short> action)
Deprecated.
|
void |
forEach(LongShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Short |
get(java.lang.Object key)
Deprecated.
|
short |
getDefaultReturnValue()
Method to see what the default return value is.
|
short |
getOrDefault(long key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Short |
getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
Deprecated.
|
short |
getShort(long key)
A Type Specific get method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2ShortMap.Entry> |
long2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
java.lang.Short |
merge(java.lang.Long key,
java.lang.Short value,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
void |
mergeAllShort(Long2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(long key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
short |
put(long key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Short |
put(java.lang.Long key,
java.lang.Short value)
Deprecated.
|
void |
putAll(long[] keys,
short[] 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(Long2ShortMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Short> m) |
void |
putAllIfAbsent(Long2ShortMap m)
Type-Specific bulk put method put elements into the map if not present.
|
short |
putIfAbsent(long key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Short |
putIfAbsent(java.lang.Long key,
java.lang.Short value)
Deprecated.
|
short |
remLong(long key)
Type Specific remove function to reduce boxing/unboxing
|
short |
remLongOrDefault(long key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(long key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Short |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
short |
replace(long key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Short |
replace(java.lang.Long key,
java.lang.Short value)
Deprecated.
|
boolean |
replace(long key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Long key,
java.lang.Short oldValue,
java.lang.Short newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
void |
replaceShorts(Long2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(LongShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2ShortMap |
setDefaultReturnValue(short v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
ShortCollection |
values() |
entrySet, equals, hashCodeentrySet, putAllpublic short getDefaultReturnValue()
Long2ShortMapgetDefaultReturnValue in interface Long2ShortMapgetDefaultReturnValue in class AbstractLong2ShortMappublic AbstractLong2ShortMap setDefaultReturnValue(short v)
Long2ShortMapsetDefaultReturnValue in interface Long2ShortMapsetDefaultReturnValue in class AbstractLong2ShortMapv - value that should be the default return valuepublic short put(long key,
short value)
Long2ShortMapput in interface Long2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(long key,
short value)
Long2ShortMapputIfAbsent in interface Long2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Long2ShortMap m)
Long2ShortMapputAllIfAbsent in interface Long2ShortMapputAllIfAbsent in class AbstractLong2ShortMapm - elements that should be added if not present.public short addTo(long key,
short value)
Long2ShortMapaddTo in interface Long2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic void addToAll(Long2ShortMap m)
Long2ShortMapaddToAll in interface Long2ShortMapaddToAll in class AbstractLong2ShortMapm - the values that should be added/insertedpublic void putAll(Long2ShortMap m)
Long2ShortMapputAll in interface Long2ShortMapputAll in class AbstractLong2ShortMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Short> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Short>putAll in class AbstractLong2ShortMappublic void putAll(long[] keys,
short[] values,
int offset,
int size)
Long2ShortMapputAll in interface Long2ShortMapputAll in class AbstractLong2ShortMapkeys - 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(long key)
Long2ShortMapcontainsKey in interface Long2ShortMapcontainsKey in class AbstractLong2ShortMapkey - element that is searched forpublic boolean containsValue(short value)
Long2ShortMapcontainsValue in interface Long2ShortMapcontainsValue in class AbstractLong2ShortMapvalue - element that is searched forpublic short getShort(long key)
Long2ShortMapgetShort in interface Long2ShortFunctiongetShort in interface Long2ShortMapkey - the key that is searched forpublic short remLong(long key)
Long2ShortMapremLong in interface Long2ShortMapkey - the element that should be removedpublic short remLongOrDefault(long key,
short defaultValue)
Long2ShortMapremLongOrDefault in interface Long2ShortMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
short value)
Long2ShortMapremove in interface Long2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
short oldValue,
short newValue)
Long2ShortMapreplace in interface Long2ShortMapreplace in class AbstractLong2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(long key,
short value)
Long2ShortMapreplace in interface Long2ShortMapreplace in class AbstractLong2ShortMapkey - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Long2ShortMap m)
Long2ShortMapreplaceShorts in interface Long2ShortMapreplaceShorts in class AbstractLong2ShortMapm - elements that should be replaced.public void replaceShorts(LongShortUnaryOperator mappingFunction)
Long2ShortMapreplaceShorts in interface Long2ShortMapreplaceShorts in class AbstractLong2ShortMapmappingFunction - operation to replace all valuespublic short computeShort(long key,
LongShortUnaryOperator mappingFunction)
Long2ShortMapcomputeShort in interface Long2ShortMapcomputeShort in class AbstractLong2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(long key,
Long2ShortFunction mappingFunction)
Long2ShortMapcomputeShortIfAbsent in interface Long2ShortMapcomputeShortIfAbsent in class AbstractLong2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(long key,
LongShortUnaryOperator mappingFunction)
Long2ShortMapcomputeShortIfPresent in interface Long2ShortMapcomputeShortIfPresent in class AbstractLong2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(long key,
short value,
ShortShortUnaryOperator mappingFunction)
Long2ShortMapmergeShort in interface Long2ShortMapmergeShort in class AbstractLong2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Long2ShortMap m, ShortShortUnaryOperator mappingFunction)
Long2ShortMapmergeAllShort in interface Long2ShortMapmergeAllShort in class AbstractLong2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic short getOrDefault(long key,
short defaultValue)
Long2ShortMapgetOrDefault in interface Long2ShortMapgetOrDefault in class AbstractLong2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongShortConsumer action)
Long2ShortMapforEach in interface Long2ShortMapforEach in class AbstractLong2ShortMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Short>size in class java.util.AbstractMap<java.lang.Long,java.lang.Short>public LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Short>keySet in interface Long2ShortMapkeySet in class AbstractLong2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Short>values in interface Long2ShortMapvalues in class AbstractLong2ShortMappublic ObjectSet<Long2ShortMap.Entry> long2ShortEntrySet()
Long2ShortMaplong2ShortEntrySet in interface Long2ShortMap@Deprecated public java.lang.Short get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,java.lang.Short>get in interface Long2ShortMapget in class AbstractLong2ShortMap@Deprecated
public java.lang.Short getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Short>getOrDefault in interface Long2ShortMapgetOrDefault in class AbstractLong2ShortMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Long,java.lang.Short>containsValue in interface Long2ShortMapcontainsValue in class java.util.AbstractMap<java.lang.Long,java.lang.Short>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Long,java.lang.Short>containsKey in interface Long2ShortMapcontainsKey in class java.util.AbstractMap<java.lang.Long,java.lang.Short>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Short put(java.lang.Long key,
java.lang.Short value)
put in interface java.util.Map<java.lang.Long,java.lang.Short>put in interface Long2ShortMapput in class java.util.AbstractMap<java.lang.Long,java.lang.Short>@Deprecated public java.lang.Short remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Long,java.lang.Short>remove in interface Long2ShortMapremove in class java.util.AbstractMap<java.lang.Long,java.lang.Short>key - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Short>@Deprecated
public java.lang.Short putIfAbsent(java.lang.Long key,
java.lang.Short value)
putIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Short>putIfAbsent in interface Long2ShortMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Long,java.lang.Short>remove in interface Long2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Long key,
java.lang.Short oldValue,
java.lang.Short newValue)
replace in interface java.util.Map<java.lang.Long,java.lang.Short>replace in interface Long2ShortMap@Deprecated
public java.lang.Short replace(java.lang.Long key,
java.lang.Short value)
replace in interface java.util.Map<java.lang.Long,java.lang.Short>replace in interface Long2ShortMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Long,java.lang.Short>replaceAll in interface Long2ShortMap@Deprecated
public java.lang.Short compute(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
compute in interface java.util.Map<java.lang.Long,java.lang.Short>compute in interface Long2ShortMap@Deprecated
public java.lang.Short computeIfAbsent(java.lang.Long key,
java.util.function.Function<? super java.lang.Long,? extends java.lang.Short> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Long,java.lang.Short>computeIfAbsent in interface Long2ShortMap@Deprecated
public java.lang.Short computeIfPresent(java.lang.Long key,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Long,java.lang.Short>computeIfPresent in interface Long2ShortMap@Deprecated
public java.lang.Short merge(java.lang.Long key,
java.lang.Short value,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
merge in interface java.util.Map<java.lang.Long,java.lang.Short>merge in interface Long2ShortMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Long,? super java.lang.Short> action)
forEach in interface java.util.Map<java.lang.Long,java.lang.Short>forEach in interface Long2ShortMap