T - the type of elements maintained by this Collectionpublic interface Object2DoubleMap<T> extends java.util.Map<T,java.lang.Double>, Object2DoubleFunction<T>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Object2DoubleMap.Entry<T>
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Object2DoubleMap.FastEntrySet<T>
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(T key,
double value)
A Helper method to add a primitives together.
|
void |
addToAll(Object2DoubleMap<T> m)
A Helper method to bulk add primitives together.
|
default java.lang.Double |
compute(T key,
java.util.function.BiFunction<? super T,? super java.lang.Double,? extends java.lang.Double> mappingFunction) |
double |
computeDouble(T key,
ObjectDoubleUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(T key,
Object2DoubleFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(T key,
ObjectDoubleUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default java.lang.Double |
computeIfAbsent(T key,
java.util.function.Function<? super T,? extends java.lang.Double> mappingFunction) |
default java.lang.Double |
computeIfPresent(T key,
java.util.function.BiFunction<? super T,? super java.lang.Double,? extends java.lang.Double> mappingFunction) |
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
default boolean |
containsValue(java.lang.Object value) |
ObjectSet<java.util.Map.Entry<T,java.lang.Double>> |
entrySet() |
default void |
forEach(java.util.function.BiConsumer<? super T,? super java.lang.Double> action) |
void |
forEach(ObjectDoubleConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
default java.lang.Double |
get(java.lang.Object key) |
double |
getDefaultReturnValue()
Method to see what the default return value is.
|
double |
getDouble(T key)
A Type Specific get method to reduce boxing/unboxing
|
default java.lang.Double |
getOrDefault(java.lang.Object key,
java.lang.Double defaultValue) |
double |
getOrDefault(T key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
default java.lang.Double |
merge(T key,
java.lang.Double value,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Double,? extends java.lang.Double> mappingFunction) |
void |
mergeAllDouble(Object2DoubleMap<T> m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(T key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2DoubleMap.Entry<T>> |
object2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
put(T key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
default java.lang.Double |
put(T key,
java.lang.Double value) |
void |
putAll(Object2DoubleMap<T> m)
Type Specific function for the bull putting of values
|
default void |
putAll(T[] keys,
double[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(T[] 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 |
putAllIfAbsent(Object2DoubleMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
double |
putIfAbsent(T key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
default java.lang.Double |
putIfAbsent(T key,
java.lang.Double value) |
double |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
double |
remOrDefault(T key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
default java.lang.Double |
remove(java.lang.Object key) |
default boolean |
remove(java.lang.Object key,
java.lang.Object value) |
boolean |
remove(T key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
replace(T key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
default java.lang.Double |
replace(T key,
java.lang.Double value) |
boolean |
replace(T key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
default boolean |
replace(T key,
java.lang.Double oldValue,
java.lang.Double newValue) |
default void |
replaceAll(java.util.function.BiFunction<? super T,? super java.lang.Double,? extends java.lang.Double> mappingFunction) |
void |
replaceDoubles(Object2DoubleMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(ObjectDoubleUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
Object2DoubleMap<T> |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
DoubleCollection |
values() |
clear, containsKey, equals, hashCode, isEmpty, putAll, sizeapplyAsDoubledouble getDefaultReturnValue()
Object2DoubleMap<T> setDefaultReturnValue(double v)
v - value that should be the default return valuedouble put(T key, double value)
key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)default void putAll(T[] 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(T[] 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)double putIfAbsent(T key, double value)
key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)void putAllIfAbsent(Object2DoubleMap<T> m)
m - elements that should be added if not present.double addTo(T key, double value)
key - the key that should be inserted,value - the value that should be inserted / addedvoid addToAll(Object2DoubleMap<T> m)
m - the values that should be added/insertedvoid putAll(Object2DoubleMap<T> m)
m - the elements that should be insertedboolean containsValue(double value)
value - element that is searched fordefault boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<T,java.lang.Double>value - that is searched for.Map.containsValue(Object)double rem(T key)
key - the element that should be removeddefault java.lang.Double remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Double>key - the element that should be removedMap.remove(Object)boolean remove(T 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<T,java.lang.Double>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)double remOrDefault(T 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(T 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(T key, double value)
key - the element that should be searched forvalue - the value to replace with.void replaceDoubles(Object2DoubleMap<T> m)
m - elements that should be replaced.void replaceDoubles(ObjectDoubleUnaryOperator<T> mappingFunction)
mappingFunction - operation to replace all valuesdouble computeDouble(T key, ObjectDoubleUnaryOperator<T> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valuedouble computeDoubleIfAbsent(T key, Object2DoubleFunction<T> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentdouble computeDoubleIfPresent(T key, ObjectDoubleUnaryOperator<T> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentdouble mergeDouble(T 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(Object2DoubleMap<T> m, DoubleDoubleUnaryOperator mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuedefault boolean replace(T key, java.lang.Double oldValue, java.lang.Double newValue)
replace in interface java.util.Map<T,java.lang.Double>default java.lang.Double replace(T key, java.lang.Double value)
replace in interface java.util.Map<T,java.lang.Double>double getDouble(T key)
getDouble in interface Object2DoubleFunction<T>key - the key that is searched fordouble getOrDefault(T key, double defaultValue)
key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentdefault java.lang.Double get(java.lang.Object key)
get in interface java.util.Map<T,java.lang.Double>default java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Double>default void replaceAll(java.util.function.BiFunction<? super T,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
replaceAll in interface java.util.Map<T,java.lang.Double>default java.lang.Double compute(T key, java.util.function.BiFunction<? super T,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
compute in interface java.util.Map<T,java.lang.Double>default java.lang.Double computeIfAbsent(T key, java.util.function.Function<? super T,? extends java.lang.Double> mappingFunction)
computeIfAbsent in interface java.util.Map<T,java.lang.Double>default java.lang.Double computeIfPresent(T key, java.util.function.BiFunction<? super T,? super java.lang.Double,? extends java.lang.Double> mappingFunction)
computeIfPresent in interface java.util.Map<T,java.lang.Double>default java.lang.Double merge(T 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<T,java.lang.Double>void forEach(ObjectDoubleConsumer<T> action)
action - processor of the values that are iterator overdefault void forEach(java.util.function.BiConsumer<? super T,? super java.lang.Double> action)
forEach in interface java.util.Map<T,java.lang.Double>DoubleCollection values()
values in interface java.util.Map<T,java.lang.Double>ObjectSet<java.util.Map.Entry<T,java.lang.Double>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Double>ObjectSet<Object2DoubleMap.Entry<T>> object2DoubleEntrySet()
default java.lang.Double put(T key, java.lang.Double value)
put in interface java.util.Map<T,java.lang.Double>