public static class Short2FloatMaps.SingletonMap extends AbstractShort2FloatMap
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.
|
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
|
Short2FloatMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
float |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(short key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
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
|
float |
putIfAbsent(short key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
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.
|
ObjectSet<Short2FloatMap.Entry> |
short2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
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() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceFloats, replaceFloats, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic float put(short key,
float value)
Short2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(short key,
float value)
Short2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(short key,
float value)
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 removedkey - that should be subtract fromvalue - that should be subtractpublic float remove(short key)
Short2FloatMapkey - the element that should be removedpublic float removeOrDefault(short key,
float defaultValue)
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)
Short2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float get(short key)
Short2FloatMapkey - the key that is searched forpublic 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 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 Short2FloatMaps.SingletonMap 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()
Short2FloatMap