public static class Byte2FloatMaps.SingletonMap extends AbstractByte2FloatMap
AbstractByte2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2FloatMap.BuilderCache, Byte2FloatMap.Entry, Byte2FloatMap.FastEntrySet, Byte2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(byte key,
float value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2FloatMap.Entry> |
byte2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
float |
computeFloat(byte key,
ByteFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(byte key,
Byte2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(byte key,
ByteFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Byte2FloatMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
float |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(byte key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ByteSet |
keySet() |
void |
mergeAllFloat(Byte2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(byte key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(byte key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(byte key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(byte key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
subFrom(byte key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(byte 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, toStringapplyAsFloat, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic float put(byte key,
float value)
Byte2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(byte key,
float value)
Byte2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(byte key,
float value)
Byte2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(byte key,
float value)
Byte2FloatMapByte2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic float remove(byte key)
Byte2FloatMapkey - the element that should be removedpublic float removeOrDefault(byte key,
float defaultValue)
Byte2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(byte key,
float value)
Byte2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float get(byte key)
Byte2FloatMapkey - the key that is searched forpublic float getOrDefault(byte key,
float defaultValue)
Byte2FloatMapgetOrDefault in interface Byte2FloatMapgetOrDefault in class AbstractByte2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float computeFloat(byte key,
ByteFloatUnaryOperator mappingFunction)
Byte2FloatMapcomputeFloat in interface Byte2FloatMapcomputeFloat in class AbstractByte2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(byte key,
Byte2FloatFunction mappingFunction)
Byte2FloatMapcomputeFloatIfAbsent in interface Byte2FloatMapcomputeFloatIfAbsent in class AbstractByte2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(byte key,
ByteFloatUnaryOperator mappingFunction)
Byte2FloatMapcomputeFloatIfPresent in interface Byte2FloatMapcomputeFloatIfPresent in class AbstractByte2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(byte key,
FloatSupplier valueProvider)
Byte2FloatMapsupplyFloatIfAbsent in interface Byte2FloatMapsupplyFloatIfAbsent in class AbstractByte2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(byte key,
float value,
FloatFloatUnaryOperator mappingFunction)
Byte2FloatMapmergeFloat in interface Byte2FloatMapmergeFloat in class AbstractByte2FloatMapkey - 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(Byte2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Byte2FloatMapmergeAllFloat in interface Byte2FloatMapmergeAllFloat in class AbstractByte2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Byte2FloatMaps.SingletonMap copy()
Byte2FloatMapcopy in interface Byte2FloatMapcopy in class AbstractByte2FloatMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Float>keySet in interface Byte2FloatMapkeySet in class AbstractByte2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Float>values in interface Byte2FloatMapvalues in class AbstractByte2FloatMappublic ObjectSet<Byte2FloatMap.Entry> byte2FloatEntrySet()
Byte2FloatMap