public static class Char2FloatMaps.EmptyMap extends AbstractChar2FloatMap
AbstractChar2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2FloatMap.BuilderCache, Char2FloatMap.Entry, Char2FloatMap.FastEntrySet, Char2FloatMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(char key,
float value)
A Helper method to add a primitives together.
|
ObjectSet<Char2FloatMap.Entry> |
char2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
float |
computeFloat(char key,
CharFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(char key,
Char2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(char key,
CharFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Char2FloatMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
float |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(char key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharSet |
keySet() |
void |
mergeAllFloat(Char2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(char key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(char key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(char key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(char key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
subFrom(char key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(char 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(char key,
float value)
Char2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(char key,
float value)
Char2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(char key,
float value)
Char2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(char key,
float value)
Char2FloatMapChar2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic float remove(char key)
Char2FloatMapkey - the element that should be removedpublic float removeOrDefault(char key,
float defaultValue)
Char2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(char key,
float value)
Char2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float get(char key)
Char2FloatMapkey - the key that is searched forpublic float getOrDefault(char key,
float defaultValue)
Char2FloatMapgetOrDefault in interface Char2FloatMapgetOrDefault in class AbstractChar2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float computeFloat(char key,
CharFloatUnaryOperator mappingFunction)
Char2FloatMapcomputeFloat in interface Char2FloatMapcomputeFloat in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(char key,
Char2FloatFunction mappingFunction)
Char2FloatMapcomputeFloatIfAbsent in interface Char2FloatMapcomputeFloatIfAbsent in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(char key,
CharFloatUnaryOperator mappingFunction)
Char2FloatMapcomputeFloatIfPresent in interface Char2FloatMapcomputeFloatIfPresent in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(char key,
FloatSupplier valueProvider)
Char2FloatMapsupplyFloatIfAbsent in interface Char2FloatMapsupplyFloatIfAbsent in class AbstractChar2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(char key,
float value,
FloatFloatUnaryOperator mappingFunction)
Char2FloatMapmergeFloat in interface Char2FloatMapmergeFloat in class AbstractChar2FloatMapkey - 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(Char2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Char2FloatMapmergeAllFloat in interface Char2FloatMapmergeAllFloat in class AbstractChar2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Float>keySet in interface Char2FloatMapkeySet in class AbstractChar2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Float>values in interface Char2FloatMapvalues in class AbstractChar2FloatMappublic ObjectSet<Char2FloatMap.Entry> char2FloatEntrySet()
Char2FloatMappublic Char2FloatMaps.EmptyMap copy()
Char2FloatMapcopy in interface Char2FloatMapcopy in class AbstractChar2FloatMap