public static class Float2FloatMaps.SingletonMap extends AbstractFloat2FloatMap
AbstractFloat2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2FloatMap.BuilderCache, Float2FloatMap.Entry, Float2FloatMap.FastEntrySet, Float2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(float key,
float value)
A Helper method to add a primitives together.
|
float |
computeFloat(float key,
FloatFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(float key,
FloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(float key,
FloatFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Float2FloatMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Float2FloatMap.Entry> |
float2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
float |
get(float key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(float key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
FloatSet |
keySet() |
void |
mergeAllFloat(Float2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(float key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(float key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(float key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(float key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(float key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(float key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
subFrom(float key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(float 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, unmodifiableandThen, compose, identitypublic float put(float key,
float value)
Float2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(float key,
float value)
Float2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(float key,
float value)
Float2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(float key,
float value)
Float2FloatMapFloat2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic float remove(float key)
Float2FloatMapkey - the element that should be removedpublic float removeOrDefault(float key,
float defaultValue)
Float2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(float key,
float value)
Float2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float get(float key)
Float2FloatMapkey - the key that is searched forpublic float getOrDefault(float key,
float defaultValue)
Float2FloatMapgetOrDefault in interface Float2FloatMapgetOrDefault in class AbstractFloat2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float computeFloat(float key,
FloatFloatUnaryOperator mappingFunction)
Float2FloatMapcomputeFloat in interface Float2FloatMapcomputeFloat in class AbstractFloat2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(float key,
FloatUnaryOperator mappingFunction)
Float2FloatMapcomputeFloatIfAbsent in interface Float2FloatMapcomputeFloatIfAbsent in class AbstractFloat2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(float key,
FloatFloatUnaryOperator mappingFunction)
Float2FloatMapcomputeFloatIfPresent in interface Float2FloatMapcomputeFloatIfPresent in class AbstractFloat2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(float key,
FloatSupplier valueProvider)
Float2FloatMapsupplyFloatIfAbsent in interface Float2FloatMapsupplyFloatIfAbsent in class AbstractFloat2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(float key,
float value,
FloatFloatUnaryOperator mappingFunction)
Float2FloatMapmergeFloat in interface Float2FloatMapmergeFloat in class AbstractFloat2FloatMapkey - 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(Float2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Float2FloatMapmergeAllFloat in interface Float2FloatMapmergeAllFloat in class AbstractFloat2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Float2FloatMaps.SingletonMap copy()
Float2FloatMapcopy in interface Float2FloatMapcopy in class AbstractFloat2FloatMappublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,java.lang.Float>keySet in interface Float2FloatMapkeySet in class AbstractFloat2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Float,java.lang.Float>values in interface Float2FloatMapvalues in class AbstractFloat2FloatMappublic ObjectSet<Float2FloatMap.Entry> float2FloatEntrySet()
Float2FloatMap