public static class Int2ShortMaps.SynchronizedMap extends AbstractInt2ShortMap implements Int2ShortMap
AbstractInt2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2ShortMap.BuilderCache, Int2ShortMap.Entry, Int2ShortMap.FastEntrySet, Int2ShortMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
short |
addTo(int key,
short value)
A Helper method to add a primitives together.
|
void |
addToAll(Int2ShortMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Short |
compute(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
java.lang.Short |
computeIfAbsent(java.lang.Integer key,
java.util.function.Function<? super java.lang.Integer,? extends java.lang.Short> mappingFunction)
Deprecated.
|
java.lang.Short |
computeIfPresent(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
short |
computeShort(int key,
IntShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int 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
|
Int2ShortMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Integer,? super java.lang.Short> action)
Deprecated.
|
void |
forEach(IntShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
short |
get(int key)
A Type Specific get 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(int 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.
|
ObjectSet<Int2ShortMap.Entry> |
int2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
java.lang.Short |
merge(java.lang.Integer 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(Int2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
java.lang.Short |
put(java.lang.Integer key,
java.lang.Short value)
Deprecated.
|
short |
put(int key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(int[] 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(Int2ShortMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> m) |
void |
putAllIfAbsent(Int2ShortMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Short |
putIfAbsent(java.lang.Integer key,
java.lang.Short value)
Deprecated.
|
short |
putIfAbsent(int key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int 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 |
removeOrDefault(int key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
java.lang.Short |
replace(java.lang.Integer key,
java.lang.Short value)
Deprecated.
|
boolean |
replace(java.lang.Integer key,
java.lang.Short oldValue,
java.lang.Short newValue)
Deprecated.
|
short |
replace(int key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
Deprecated.
|
void |
replaceShorts(Int2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(IntShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractInt2ShortMap |
setDefaultReturnValue(short v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
short |
subFrom(int key,
short value)
A Helper method to subtract from primitive from each other.
|
short |
supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic short getDefaultReturnValue()
Int2ShortMapgetDefaultReturnValue in interface Int2ShortMapgetDefaultReturnValue in class AbstractInt2ShortMappublic AbstractInt2ShortMap setDefaultReturnValue(short v)
Int2ShortMapsetDefaultReturnValue in interface Int2ShortMapsetDefaultReturnValue in class AbstractInt2ShortMapv - value that should be the default return valuepublic short put(int key,
short value)
Int2ShortMapput in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(int key,
short value)
Int2ShortMapputIfAbsent in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Int2ShortMap m)
Int2ShortMapputAllIfAbsent in interface Int2ShortMapputAllIfAbsent in class AbstractInt2ShortMapm - elements that should be added if not present.public short addTo(int key,
short value)
Int2ShortMapaddTo in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(int key,
short value)
Int2ShortMapInt2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2ShortMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Int2ShortMap m)
Int2ShortMapaddToAll in interface Int2ShortMapaddToAll in class AbstractInt2ShortMapm - the values that should be added/insertedpublic void putAll(Int2ShortMap m)
Int2ShortMapputAll in interface Int2ShortMapputAll in class AbstractInt2ShortMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> m)
putAll in interface java.util.Map<java.lang.Integer,java.lang.Short>putAll in class AbstractInt2ShortMappublic void putAll(int[] keys,
short[] values,
int offset,
int size)
Int2ShortMapputAll in interface Int2ShortMapputAll in class AbstractInt2ShortMapkeys - 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(int key)
Int2ShortMapcontainsKey in interface Int2ShortMapcontainsKey in class AbstractInt2ShortMapkey - element that is searched forpublic boolean containsValue(short value)
Int2ShortMapcontainsValue in interface Int2ShortMapcontainsValue in class AbstractInt2ShortMapvalue - element that is searched forpublic short get(int key)
Int2ShortMapget in interface Int2ShortFunctionget in interface Int2ShortMapkey - the key that is searched forpublic short remove(int key)
Int2ShortMapremove in interface Int2ShortMapkey - the element that should be removedpublic short removeOrDefault(int key,
short defaultValue)
Int2ShortMapremoveOrDefault in interface Int2ShortMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
short value)
Int2ShortMapremove in interface Int2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
short oldValue,
short newValue)
Int2ShortMapreplace in interface Int2ShortMapreplace in class AbstractInt2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(int key,
short value)
Int2ShortMapreplace in interface Int2ShortMapreplace in class AbstractInt2ShortMapkey - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Int2ShortMap m)
Int2ShortMapreplaceShorts in interface Int2ShortMapreplaceShorts in class AbstractInt2ShortMapm - elements that should be replaced.public void replaceShorts(IntShortUnaryOperator mappingFunction)
Int2ShortMapreplaceShorts in interface Int2ShortMapreplaceShorts in class AbstractInt2ShortMapmappingFunction - operation to replace all valuespublic short computeShort(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShort in interface Int2ShortMapcomputeShort in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
Int2ShortMapcomputeShortIfAbsent in interface Int2ShortMapcomputeShortIfAbsent in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShortIfPresent in interface Int2ShortMapcomputeShortIfPresent in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
Int2ShortMapsupplyShortIfAbsent in interface Int2ShortMapsupplyShortIfAbsent in class AbstractInt2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeShort in interface Int2ShortMapmergeShort in class AbstractInt2ShortMapkey - 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(Int2ShortMap m, ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeAllShort in interface Int2ShortMapmergeAllShort in class AbstractInt2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic short getOrDefault(int key,
short defaultValue)
Int2ShortMapgetOrDefault in interface Int2ShortMapgetOrDefault in class AbstractInt2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(IntShortConsumer action)
Int2ShortMapforEach in interface Int2ShortMapforEach in class AbstractInt2ShortMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Short>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public Int2ShortMap copy()
Int2ShortMapcopy in interface Int2ShortMapcopy in class AbstractInt2ShortMappublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Short>keySet in interface Int2ShortMapkeySet in class AbstractInt2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Short>values in interface Int2ShortMapvalues in class AbstractInt2ShortMappublic ObjectSet<Int2ShortMap.Entry> int2ShortEntrySet()
Int2ShortMapint2ShortEntrySet in interface Int2ShortMap@Deprecated public java.lang.Short get(java.lang.Object key)
get in interface java.util.Map<java.lang.Integer,java.lang.Short>get in interface Int2ShortMapget in class AbstractInt2ShortMap@Deprecated
public java.lang.Short getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
getOrDefault in interface java.util.Map<java.lang.Integer,java.lang.Short>getOrDefault in interface Int2ShortMapgetOrDefault in class AbstractInt2ShortMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Integer,java.lang.Short>containsValue in interface Int2ShortMapcontainsValue in class java.util.AbstractMap<java.lang.Integer,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.Integer,java.lang.Short>containsKey in interface Int2ShortMapcontainsKey in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Short put(java.lang.Integer key,
java.lang.Short value)
put in interface java.util.Map<java.lang.Integer,java.lang.Short>put in interface Int2ShortMapput in class AbstractInt2ShortMap@Deprecated public java.lang.Short remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Integer,java.lang.Short>remove in interface Int2ShortMapremove in class AbstractInt2ShortMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>@Deprecated
public java.lang.Short putIfAbsent(java.lang.Integer key,
java.lang.Short value)
putIfAbsent in interface java.util.Map<java.lang.Integer,java.lang.Short>putIfAbsent in interface Int2ShortMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Integer,java.lang.Short>remove in interface Int2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Integer key,
java.lang.Short oldValue,
java.lang.Short newValue)
replace in interface java.util.Map<java.lang.Integer,java.lang.Short>replace in interface Int2ShortMap@Deprecated
public java.lang.Short replace(java.lang.Integer key,
java.lang.Short value)
replace in interface java.util.Map<java.lang.Integer,java.lang.Short>replace in interface Int2ShortMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Integer,java.lang.Short>replaceAll in interface Int2ShortMap@Deprecated
public java.lang.Short compute(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
compute in interface java.util.Map<java.lang.Integer,java.lang.Short>compute in interface Int2ShortMap@Deprecated
public java.lang.Short computeIfAbsent(java.lang.Integer key,
java.util.function.Function<? super java.lang.Integer,? extends java.lang.Short> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Integer,java.lang.Short>computeIfAbsent in interface Int2ShortMap@Deprecated
public java.lang.Short computeIfPresent(java.lang.Integer key,
java.util.function.BiFunction<? super java.lang.Integer,? super java.lang.Short,? extends java.lang.Short> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Integer,java.lang.Short>computeIfPresent in interface Int2ShortMap@Deprecated
public java.lang.Short merge(java.lang.Integer 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.Integer,java.lang.Short>merge in interface Int2ShortMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Integer,? super java.lang.Short> action)
forEach in interface java.util.Map<java.lang.Integer,java.lang.Short>forEach in interface Int2ShortMap