public interface Char2DoubleMap extends java.util.Map<java.lang.Character,java.lang.Double>, Char2DoubleFunction
| Modifier and Type | Interface and Description |
|---|---|
static class |
Char2DoubleMap.BuilderCache
Builder Cache for allowing to buildMaps
|
static interface |
Char2DoubleMap.Entry
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Char2DoubleMap.FastEntrySet
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
static class |
Char2DoubleMap.MapBuilder
Helper class that reduces the method spam of the Map Class.
|
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(char key,
double value)
A Helper method to add a primitives together.
|
void |
addToAll(Char2DoubleMap m)
A Helper method to bulk add primitives together.
|
static Char2DoubleMap.MapBuilder |
builder()
Helper Class that allows to create Maps without requiring a to type out the entire implementation or know it.
|
ObjectSet<Char2DoubleMap.Entry> |
char2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
default java.lang.Double |
compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
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
|
default java.lang.Double |
computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends java.lang.Double> mappingFunction)
Deprecated.
|
default java.lang.Double |
computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
default boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
default boolean |
containsValue(java.lang.Object value) |
Char2DoubleMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Character,java.lang.Double>> |
entrySet()
Deprecated.
|
default void |
forEach(java.util.function.BiConsumer<? super java.lang.Character,? super java.lang.Double> action)
Deprecated.
|
void |
forEach(CharDoubleConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
double |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
default java.lang.Double |
get(java.lang.Object key)
Deprecated.
|
double |
getDefaultReturnValue()
Method to see what the default return value is.
|
double |
getOrDefault(char key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
default java.lang.Double |
getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
Deprecated.
|
CharSet |
keySet() |
default java.lang.Double |
merge(java.lang.Character key,
java.lang.Double value,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
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
|
default java.lang.Double |
put(java.lang.Character key,
java.lang.Double value)
Deprecated.
|
double |
put(char key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
default void |
putAll(char[] keys,
double[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(char[] keys,
double[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Char2DoubleMap m)
Type Specific function for the bull putting of values
|
default void |
putAll(java.lang.Character[] keys,
java.lang.Double[] values)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(java.lang.Character[] keys,
java.lang.Double[] values,
int offset,
int size)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAllIfAbsent(Char2DoubleMap m)
Type-Specific bulk put method put elements into the map if not present.
|
default java.lang.Double |
putIfAbsent(java.lang.Character key,
java.lang.Double value)
Deprecated.
|
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
|
default java.lang.Double |
remove(java.lang.Object key) |
default boolean |
remove(java.lang.Object key,
java.lang.Object value) |
double |
removeOrDefault(char key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
default java.lang.Double |
replace(java.lang.Character key,
java.lang.Double value)
Deprecated.
|
default boolean |
replace(java.lang.Character key,
java.lang.Double oldValue,
java.lang.Double newValue)
Deprecated.
|
double |
replace(char key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
default void |
replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
Deprecated.
|
void |
replaceDoubles(Char2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(CharDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
Char2DoubleMap |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
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
|
default Char2DoubleMap |
synchronize()
Creates a Wrapped Map that is Synchronized
|
default Char2DoubleMap |
synchronize(java.lang.Object mutex)
Creates a Wrapped Map that is Synchronized
|
default Char2DoubleMap |
unmodifiable()
Creates a Wrapped Map that is unmodifiable
|
DoubleCollection |
values() |
static Char2DoubleMap.MapBuilder builder()
double getDefaultReturnValue()
Char2DoubleMap setDefaultReturnValue(double v)
v - value that should be the default return valueChar2DoubleMap copy()
double put(char key,
double value)
key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)default void putAll(char[] keys,
double[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(char[] keys,
double[] values,
int offset,
int size)
keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)default void putAll(java.lang.Character[] keys,
java.lang.Double[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(java.lang.Character[] keys,
java.lang.Double[] values,
int offset,
int size)
keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)double putIfAbsent(char key,
double value)
key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)void putAllIfAbsent(Char2DoubleMap m)
m - elements that should be added if not present.double addTo(char key,
double value)
key - the key that should be inserted,value - the value that should be inserted / addedvoid addToAll(Char2DoubleMap m)
m - the values that should be added/inserteddouble subFrom(char key,
double value)
getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractvoid putAll(Char2DoubleMap m)
m - the elements that should be insertedboolean containsKey(char key)
key - element that is searched fordefault boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,java.lang.Double>key - that is searched for.Map.containsKey(Object)boolean containsValue(double value)
value - element that is searched fordefault boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Character,java.lang.Double>value - that is searched for.Map.containsValue(Object)double remove(char key)
key - the element that should be removeddefault java.lang.Double remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Character,java.lang.Double>key - the element that should be removedMap.remove(Object)boolean remove(char key,
double value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)default boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Character,java.lang.Double>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)double removeOrDefault(char key,
double defaultValue)
key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)boolean replace(char key,
double oldValue,
double newValue)
key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.double replace(char key,
double value)
key - the element that should be searched forvalue - the value to replace with.void replaceDoubles(Char2DoubleMap m)
m - elements that should be replaced.void replaceDoubles(CharDoubleUnaryOperator mappingFunction)
mappingFunction - operation to replace all valuesdouble computeDouble(char key,
CharDoubleUnaryOperator mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valuedouble computeDoubleIfAbsent(char key,
Char2DoubleFunction mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentdouble supplyDoubleIfAbsent(char key,
DoubleSupplier valueProvider)
key - the key that should be computedvalueProvider - the value if not presentdouble computeDoubleIfPresent(char key,
CharDoubleUnaryOperator mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentdouble mergeDouble(char key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuevoid mergeAllDouble(Char2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Value@Deprecated
default boolean replace(java.lang.Character key,
java.lang.Double oldValue,
java.lang.Double newValue)
replace in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double replace(java.lang.Character key,
java.lang.Double value)
replace in interface java.util.Map<java.lang.Character,java.lang.Double>double get(char key)
get in interface Char2DoubleFunctionkey - the key that is searched fordouble getOrDefault(char key,
double defaultValue)
key - the key that is searched fordefaultValue - the value that should be returned if the key is not present@Deprecated default java.lang.Double get(java.lang.Object key)
get in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated default void replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
compute in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends java.lang.Double> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double merge(java.lang.Character key,
java.lang.Double value,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
merge in interface java.util.Map<java.lang.Character,java.lang.Double>void forEach(CharDoubleConsumer action)
action - processor of the values that are iterator over@Deprecated default void forEach(java.util.function.BiConsumer<? super java.lang.Character,? super java.lang.Double> action)
forEach in interface java.util.Map<java.lang.Character,java.lang.Double>CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Double>DoubleCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated ObjectSet<java.util.Map.Entry<java.lang.Character,java.lang.Double>> entrySet()
entrySet in interface java.util.Map<java.lang.Character,java.lang.Double>ObjectSet<Char2DoubleMap.Entry> char2DoubleEntrySet()
default Char2DoubleMap synchronize()
Char2DoubleMaps.synchronize(speiger.src.collections.chars.maps.interfaces.Char2DoubleMap)default Char2DoubleMap synchronize(java.lang.Object mutex)
mutex - is the controller of the synchronization blockChar2DoubleMaps.synchronize(speiger.src.collections.chars.maps.interfaces.Char2DoubleMap)default Char2DoubleMap unmodifiable()
Char2DoubleMaps.unmodifiable(speiger.src.collections.chars.maps.interfaces.Char2DoubleMap)@Deprecated
default java.lang.Double put(java.lang.Character key,
java.lang.Double value)
put in interface java.util.Map<java.lang.Character,java.lang.Double>@Deprecated
default java.lang.Double putIfAbsent(java.lang.Character key,
java.lang.Double value)
putIfAbsent in interface java.util.Map<java.lang.Character,java.lang.Double>