T - the keyType of elements maintained by this Collectionpublic static class Object2FloatMaps.SingletonMap<T> extends AbstractObject2FloatMap<T>
AbstractObject2FloatMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2FloatMap.BuilderCache<T>, Object2FloatMap.Entry<T>, Object2FloatMap.FastEntrySet<T>, Object2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(T key,
float value)
A Helper method to add a primitives together.
|
float |
computeFloat(T key,
ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(T key,
ToFloatFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(T key,
ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Object2FloatMaps.SingletonMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
float |
getFloat(T key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(T key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
void |
mergeAllFloat(Object2FloatMap<T> m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(T key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2FloatMap.Entry<T>> |
object2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
float |
put(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remOrDefault(T key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
subFrom(T key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(T 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, setDefaultReturnValueapplyAsFloat, builder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic float put(T key, float value)
Object2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(T key, float value)
Object2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(T key, float value)
Object2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(T key, float value)
Object2FloatMapObject2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic float rem(T key)
Object2FloatMapkey - the element that should be removedpublic float remOrDefault(T key, float defaultValue)
Object2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, float value)
Object2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float getFloat(T key)
Object2FloatMapkey - the key that is searched forpublic float getOrDefault(T key, float defaultValue)
Object2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float computeFloat(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloat in interface Object2FloatMap<T>computeFloat in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(T key, ToFloatFunction<T> mappingFunction)
Object2FloatMapcomputeFloatIfAbsent in interface Object2FloatMap<T>computeFloatIfAbsent in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloatIfPresent in interface Object2FloatMap<T>computeFloatIfPresent in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(T key, FloatSupplier valueProvider)
Object2FloatMapsupplyFloatIfAbsent in interface Object2FloatMap<T>supplyFloatIfAbsent in class AbstractObject2FloatMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(T key, float value, FloatFloatUnaryOperator mappingFunction)
Object2FloatMapmergeFloat in interface Object2FloatMap<T>mergeFloat in class AbstractObject2FloatMap<T>key - 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(Object2FloatMap<T> m, FloatFloatUnaryOperator mappingFunction)
Object2FloatMapmergeAllFloat in interface Object2FloatMap<T>mergeAllFloat in class AbstractObject2FloatMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Object2FloatMaps.SingletonMap<T> copy()
Object2FloatMapcopy in interface Object2FloatMap<T>copy in class AbstractObject2FloatMap<T>public ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Float>keySet in interface Object2FloatMap<T>keySet in class AbstractObject2FloatMap<T>public FloatCollection values()
values in interface java.util.Map<T,java.lang.Float>values in interface Object2FloatMap<T>values in class AbstractObject2FloatMap<T>public ObjectSet<Object2FloatMap.Entry<T>> object2FloatEntrySet()
Object2FloatMap