public static class Short2FloatMaps.SynchronizedMap extends AbstractShort2FloatMap implements Short2FloatMap
AbstractShort2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2FloatMap.BuilderCache, Short2FloatMap.Entry, Short2FloatMap.FastEntrySet, Short2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(short key,
float value)
A Helper method to add a primitives together.
|
void |
addToAll(Short2FloatMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Float |
compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
float |
computeFloat(short key,
ShortFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(short key,
Short2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(short key,
ShortFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
java.lang.Float |
computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends java.lang.Float> mappingFunction)
Deprecated.
|
java.lang.Float |
computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Short2FloatMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Short,? super java.lang.Float> action)
Deprecated.
|
void |
forEach(ShortFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Float |
get(java.lang.Object key)
Deprecated.
|
float |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getDefaultReturnValue()
Method to see what the default return value is.
|
java.lang.Float |
getOrDefault(java.lang.Object key,
java.lang.Float defaultValue)
Deprecated.
|
float |
getOrDefault(short key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
java.lang.Float |
merge(java.lang.Short key,
java.lang.Float value,
java.util.function.BiFunction<? super java.lang.Float,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
void |
mergeAllFloat(Short2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(short key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(short key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Float |
put(java.lang.Short key,
java.lang.Float value)
Deprecated.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Float> m) |
void |
putAll(short[] keys,
float[] 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(Short2FloatMap m)
Type Specific function for the bull putting of values
|
void |
putAllIfAbsent(Short2FloatMap m)
Type-Specific bulk put method put elements into the map if not present.
|
float |
putIfAbsent(short key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Float |
putIfAbsent(java.lang.Short key,
java.lang.Float value)
Deprecated.
|
java.lang.Float |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
float |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(short key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(short key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Float |
replace(java.lang.Short key,
java.lang.Float value)
Deprecated.
|
boolean |
replace(short key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Short key,
java.lang.Float oldValue,
java.lang.Float newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
Deprecated.
|
void |
replaceFloats(Short2FloatMap m)
Type-Specific bulk replace method.
|
void |
replaceFloats(ShortFloatUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractShort2FloatMap |
setDefaultReturnValue(float v)
Method to define the default return value if a requested key isn't present
|
ObjectSet<Short2FloatMap.Entry> |
short2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
float |
subFrom(short key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(short key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
FloatCollection |
values() |
entrySet, equals, hashCode, putAllbuilder, entrySet, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic float getDefaultReturnValue()
Short2FloatMapgetDefaultReturnValue in interface Short2FloatMapgetDefaultReturnValue in class AbstractShort2FloatMappublic AbstractShort2FloatMap setDefaultReturnValue(float v)
Short2FloatMapsetDefaultReturnValue in interface Short2FloatMapsetDefaultReturnValue in class AbstractShort2FloatMapv - value that should be the default return valuepublic float put(short key,
float value)
Short2FloatMapput in interface Short2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(short key,
float value)
Short2FloatMapputIfAbsent in interface Short2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Short2FloatMap m)
Short2FloatMapputAllIfAbsent in interface Short2FloatMapputAllIfAbsent in class AbstractShort2FloatMapm - elements that should be added if not present.public float addTo(short key,
float value)
Short2FloatMapaddTo in interface Short2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(short key,
float value)
Short2FloatMapShort2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Short2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Short2FloatMap m)
Short2FloatMapaddToAll in interface Short2FloatMapaddToAll in class AbstractShort2FloatMapm - the values that should be added/insertedpublic void putAll(Short2FloatMap m)
Short2FloatMapputAll in interface Short2FloatMapputAll in class AbstractShort2FloatMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Float> m)
putAll in interface java.util.Map<java.lang.Short,java.lang.Float>putAll in class AbstractShort2FloatMappublic void putAll(short[] keys,
float[] values,
int offset,
int size)
Short2FloatMapputAll in interface Short2FloatMapputAll in class AbstractShort2FloatMapkeys - 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)
Short2FloatMapcontainsKey in interface Short2FloatMapcontainsKey in class AbstractShort2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Short2FloatMapcontainsValue in interface Short2FloatMapcontainsValue in class AbstractShort2FloatMapvalue - element that is searched forpublic float get(short key)
Short2FloatMapget in interface Short2FloatFunctionget in interface Short2FloatMapkey - the key that is searched forpublic float remove(short key)
Short2FloatMapremove in interface Short2FloatMapkey - the element that should be removedpublic float removeOrDefault(short key,
float defaultValue)
Short2FloatMapremoveOrDefault in interface Short2FloatMapkey - 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,
float value)
Short2FloatMapremove in interface Short2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
float oldValue,
float newValue)
Short2FloatMapreplace in interface Short2FloatMapreplace in class AbstractShort2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(short key,
float value)
Short2FloatMapreplace in interface Short2FloatMapreplace in class AbstractShort2FloatMapkey - the element that should be searched forvalue - the value to replace with.public void replaceFloats(Short2FloatMap m)
Short2FloatMapreplaceFloats in interface Short2FloatMapreplaceFloats in class AbstractShort2FloatMapm - elements that should be replaced.public void replaceFloats(ShortFloatUnaryOperator mappingFunction)
Short2FloatMapreplaceFloats in interface Short2FloatMapreplaceFloats in class AbstractShort2FloatMapmappingFunction - operation to replace all valuespublic float computeFloat(short key,
ShortFloatUnaryOperator mappingFunction)
Short2FloatMapcomputeFloat in interface Short2FloatMapcomputeFloat in class AbstractShort2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(short key,
Short2FloatFunction mappingFunction)
Short2FloatMapcomputeFloatIfAbsent in interface Short2FloatMapcomputeFloatIfAbsent in class AbstractShort2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(short key,
ShortFloatUnaryOperator mappingFunction)
Short2FloatMapcomputeFloatIfPresent in interface Short2FloatMapcomputeFloatIfPresent in class AbstractShort2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(short key,
FloatSupplier valueProvider)
Short2FloatMapsupplyFloatIfAbsent in interface Short2FloatMapsupplyFloatIfAbsent in class AbstractShort2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(short key,
float value,
FloatFloatUnaryOperator mappingFunction)
Short2FloatMapmergeFloat in interface Short2FloatMapmergeFloat in class AbstractShort2FloatMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllFloat(Short2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Short2FloatMapmergeAllFloat in interface Short2FloatMapmergeAllFloat in class AbstractShort2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic float getOrDefault(short key,
float defaultValue)
Short2FloatMapgetOrDefault in interface Short2FloatMapgetOrDefault in class AbstractShort2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ShortFloatConsumer action)
Short2FloatMapforEach in interface Short2FloatMapforEach in class AbstractShort2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Float>size in class java.util.AbstractMap<java.lang.Short,java.lang.Float>public Short2FloatMap copy()
Short2FloatMapcopy in interface Short2FloatMapcopy in class AbstractShort2FloatMappublic ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Float>keySet in interface Short2FloatMapkeySet in class AbstractShort2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Float>values in interface Short2FloatMapvalues in class AbstractShort2FloatMappublic ObjectSet<Short2FloatMap.Entry> short2FloatEntrySet()
Short2FloatMapshort2FloatEntrySet in interface Short2FloatMap@Deprecated public java.lang.Float get(java.lang.Object key)
get in interface java.util.Map<java.lang.Short,java.lang.Float>get in interface Short2FloatMapget in class AbstractShort2FloatMap@Deprecated
public java.lang.Float getOrDefault(java.lang.Object key,
java.lang.Float defaultValue)
getOrDefault in interface java.util.Map<java.lang.Short,java.lang.Float>getOrDefault in interface Short2FloatMapgetOrDefault in class AbstractShort2FloatMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Short,java.lang.Float>containsValue in interface Short2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Short,java.lang.Float>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.Float>containsKey in interface Short2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Short,java.lang.Float>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Float put(java.lang.Short key,
java.lang.Float value)
put in interface java.util.Map<java.lang.Short,java.lang.Float>put in interface Short2FloatMapput in class AbstractShort2FloatMap@Deprecated public java.lang.Float remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Short,java.lang.Float>remove in interface Short2FloatMapremove in class AbstractShort2FloatMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Float>@Deprecated
public java.lang.Float putIfAbsent(java.lang.Short key,
java.lang.Float value)
putIfAbsent in interface java.util.Map<java.lang.Short,java.lang.Float>putIfAbsent in interface Short2FloatMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Short,java.lang.Float>remove in interface Short2FloatMapkey - 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.Float oldValue,
java.lang.Float newValue)
replace in interface java.util.Map<java.lang.Short,java.lang.Float>replace in interface Short2FloatMap@Deprecated
public java.lang.Float replace(java.lang.Short key,
java.lang.Float value)
replace in interface java.util.Map<java.lang.Short,java.lang.Float>replace in interface Short2FloatMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Short,java.lang.Float>replaceAll in interface Short2FloatMap@Deprecated
public java.lang.Float compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
compute in interface java.util.Map<java.lang.Short,java.lang.Float>compute in interface Short2FloatMap@Deprecated
public java.lang.Float computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends java.lang.Float> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Short,java.lang.Float>computeIfAbsent in interface Short2FloatMap@Deprecated
public java.lang.Float computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Short,java.lang.Float>computeIfPresent in interface Short2FloatMap@Deprecated
public java.lang.Float merge(java.lang.Short key,
java.lang.Float value,
java.util.function.BiFunction<? super java.lang.Float,? super java.lang.Float,? extends java.lang.Float> mappingFunction)
merge in interface java.util.Map<java.lang.Short,java.lang.Float>merge in interface Short2FloatMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Short,? super java.lang.Float> action)
forEach in interface java.util.Map<java.lang.Short,java.lang.Float>forEach in interface Short2FloatMap