T - the type of elements maintained by this Collectionpublic abstract class AbstractObject2DoubleMap<T> extends java.util.AbstractMap<T,java.lang.Double> implements Object2DoubleMap<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2DoubleMap.BasicEntry<T>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2DoubleMap.BuilderCache<T>, Object2DoubleMap.Entry<T>, Object2DoubleMap.FastEntrySet<T>, Object2DoubleMap.MapBuilder| Constructor and Description |
|---|
AbstractObject2DoubleMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Object2DoubleMap<T> m)
A Helper method to bulk add primitives together.
|
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
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
Object2DoubleMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<T,java.lang.Double>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectDoubleConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Double |
get(java.lang.Object key) |
double |
getDefaultReturnValue()
Method to see what the default return value is.
|
java.lang.Double |
getOrDefault(java.lang.Object key,
java.lang.Double defaultValue) |
int |
hashCode() |
ObjectSet<T> |
keySet() |
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
|
java.lang.Double |
put(T key,
java.lang.Double value)
Deprecated.
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Double> m) |
void |
putAll(Object2DoubleMap<T> m)
Type Specific function for the bull putting of values
|
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 |
putAll(T[] 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(Object2DoubleMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Double |
remove(java.lang.Object key) |
double |
replace(T key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
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
|
AbstractObject2DoubleMap<T> |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
double |
supplyDoubleIfAbsent(T key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
DoubleCollection |
values() |
addTo, builder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getDouble, getOrDefault, merge, object2DoubleEntrySet, put, putAll, putAll, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiableapplyAsDoublepublic double getDefaultReturnValue()
Object2DoubleMapgetDefaultReturnValue in interface Object2DoubleMap<T>public AbstractObject2DoubleMap<T> setDefaultReturnValue(double v)
Object2DoubleMapsetDefaultReturnValue in interface Object2DoubleMap<T>v - value that should be the default return valuepublic Object2DoubleMap<T> copy()
Object2DoubleMapcopy in interface Object2DoubleMap<T>@Deprecated public java.lang.Double put(T key, java.lang.Double value)
put in interface java.util.Map<T,java.lang.Double>put in interface Object2DoubleMap<T>put in class java.util.AbstractMap<T,java.lang.Double>public void addToAll(Object2DoubleMap<T> m)
Object2DoubleMapaddToAll in interface Object2DoubleMap<T>m - the values that should be added/insertedpublic void putAll(Object2DoubleMap<T> m)
Object2DoubleMapputAll in interface Object2DoubleMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Double> m)
public void putAll(T[] keys, double[] values, int offset, int size)
Object2DoubleMapputAll in interface Object2DoubleMap<T>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 addedMap.putAll(Map)public void putAll(T[] keys, java.lang.Double[] values, int offset, int size)
Object2DoubleMapputAll in interface Object2DoubleMap<T>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 addedMap.putAll(Map)public void putAllIfAbsent(Object2DoubleMap<T> m)
Object2DoubleMapputAllIfAbsent in interface Object2DoubleMap<T>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(double value)
Object2DoubleMapcontainsValue in interface Object2DoubleMap<T>value - element that is searched forpublic boolean replace(T key, double oldValue, double newValue)
Object2DoubleMapreplace in interface Object2DoubleMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(T key, double value)
Object2DoubleMapreplace in interface Object2DoubleMap<T>key - the element that should be searched forvalue - the value to replace with.public void replaceDoubles(Object2DoubleMap<T> m)
Object2DoubleMapreplaceDoubles in interface Object2DoubleMap<T>m - elements that should be replaced.public void replaceDoubles(ObjectDoubleUnaryOperator<T> mappingFunction)
Object2DoubleMapreplaceDoubles in interface Object2DoubleMap<T>mappingFunction - operation to replace all valuespublic double computeDouble(T key, ObjectDoubleUnaryOperator<T> mappingFunction)
Object2DoubleMapcomputeDouble in interface Object2DoubleMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(T key, Object2DoubleFunction<T> mappingFunction)
Object2DoubleMapcomputeDoubleIfAbsent in interface Object2DoubleMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double supplyDoubleIfAbsent(T key, DoubleSupplier valueProvider)
Object2DoubleMapsupplyDoubleIfAbsent in interface Object2DoubleMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic double computeDoubleIfPresent(T key, ObjectDoubleUnaryOperator<T> mappingFunction)
Object2DoubleMapcomputeDoubleIfPresent in interface Object2DoubleMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(T key, double value, DoubleDoubleUnaryOperator mappingFunction)
Object2DoubleMapmergeDouble in interface Object2DoubleMap<T>key - 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(Object2DoubleMap<T> m, DoubleDoubleUnaryOperator mappingFunction)
Object2DoubleMapmergeAllDouble in interface Object2DoubleMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Double get(java.lang.Object key)
get in interface java.util.Map<T,java.lang.Double>get in interface Object2DoubleMap<T>get in class java.util.AbstractMap<T,java.lang.Double>public java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Double>getOrDefault in interface Object2DoubleMap<T>public java.lang.Double remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Double>remove in interface Object2DoubleMap<T>remove in class java.util.AbstractMap<T,java.lang.Double>key - the element that should be removedMap.remove(Object)public void forEach(ObjectDoubleConsumer<T> action)
Object2DoubleMapforEach in interface Object2DoubleMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Double>keySet in interface Object2DoubleMap<T>keySet in class java.util.AbstractMap<T,java.lang.Double>public DoubleCollection values()
values in interface java.util.Map<T,java.lang.Double>values in interface Object2DoubleMap<T>values in class java.util.AbstractMap<T,java.lang.Double>public ObjectSet<java.util.Map.Entry<T,java.lang.Double>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Double>entrySet in interface Object2DoubleMap<T>entrySet in class java.util.AbstractMap<T,java.lang.Double>public boolean equals(java.lang.Object o)