public static class Char2DoubleMaps.SingletonMap extends AbstractChar2DoubleMap
AbstractChar2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2DoubleMap.BuilderCache, Char2DoubleMap.Entry, Char2DoubleMap.FastEntrySet, Char2DoubleMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
double |
addTo(char key,
double value)
A Helper method to add a primitives together.
|
ObjectSet<Char2DoubleMap.Entry> |
char2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
computeDouble(char key,
CharDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(char key,
Char2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(char key,
CharDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Char2DoubleMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
double |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(char key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharSet |
keySet() |
void |
mergeAllDouble(Char2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(char key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
double |
put(char key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(char key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
removeOrDefault(char key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
double |
subFrom(char key,
double value)
A Helper method to subtract from primitive from each other.
|
double |
supplyDoubleIfAbsent(char key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
DoubleCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceDoubles, replaceDoubles, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsDouble, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic double put(char key,
double value)
Char2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(char key,
double value)
Char2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(char key,
double value)
Char2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(char key,
double value)
Char2DoubleMapChar2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic double remove(char key)
Char2DoubleMapkey - the element that should be removedpublic double removeOrDefault(char key,
double defaultValue)
Char2DoubleMapkey - 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,
double value)
Char2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double get(char key)
Char2DoubleMapkey - the key that is searched forpublic double getOrDefault(char key,
double defaultValue)
Char2DoubleMapgetOrDefault in interface Char2DoubleMapgetOrDefault in class AbstractChar2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double computeDouble(char key,
CharDoubleUnaryOperator mappingFunction)
Char2DoubleMapcomputeDouble in interface Char2DoubleMapcomputeDouble in class AbstractChar2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(char key,
Char2DoubleFunction mappingFunction)
Char2DoubleMapcomputeDoubleIfAbsent in interface Char2DoubleMapcomputeDoubleIfAbsent in class AbstractChar2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(char key,
CharDoubleUnaryOperator mappingFunction)
Char2DoubleMapcomputeDoubleIfPresent in interface Char2DoubleMapcomputeDoubleIfPresent in class AbstractChar2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double supplyDoubleIfAbsent(char key,
DoubleSupplier valueProvider)
Char2DoubleMapsupplyDoubleIfAbsent in interface Char2DoubleMapsupplyDoubleIfAbsent in class AbstractChar2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double mergeDouble(char key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Char2DoubleMapmergeDouble in interface Char2DoubleMapmergeDouble in class AbstractChar2DoubleMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllDouble(Char2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Char2DoubleMapmergeAllDouble in interface Char2DoubleMapmergeAllDouble in class AbstractChar2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Char2DoubleMaps.SingletonMap copy()
Char2DoubleMapcopy in interface Char2DoubleMapcopy in class AbstractChar2DoubleMappublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Double>keySet in interface Char2DoubleMapkeySet in class AbstractChar2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Double>values in interface Char2DoubleMapvalues in class AbstractChar2DoubleMappublic ObjectSet<Char2DoubleMap.Entry> char2DoubleEntrySet()
Char2DoubleMap