V - the keyType of elements maintained by this Collectionpublic abstract class AbstractDouble2ObjectMap<V> extends java.util.AbstractMap<java.lang.Double,V> implements Double2ObjectMap<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractDouble2ObjectMap.BasicEntry<V>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2ObjectMap.BuilderCache<V>, Double2ObjectMap.Entry<V>, Double2ObjectMap.FastEntrySet<V>, Double2ObjectMap.MapBuilder| Constructor and Description |
|---|
AbstractDouble2ObjectMap() |
| Modifier and Type | Method and Description |
|---|---|
V |
compute(double key,
DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(double key,
DoubleFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(double key,
DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Double2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Double,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(DoubleObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(double key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
DoubleSet |
keySet() |
V |
merge(double key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Double2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(java.lang.Double key,
V value)
Deprecated.
|
void |
putAll(double[] keys,
V[] 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(java.lang.Double[] keys,
V[] 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 |
putAll(Double2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Double,? extends V> m) |
void |
putAllIfAbsent(Double2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
remove(java.lang.Object key) |
V |
replace(double key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceObjects(Double2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractDouble2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(double key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
apply, builder, compute, computeIfAbsent, computeIfPresent, containsKey, double2ObjectEntrySet, forEach, get, merge, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic V getDefaultReturnValue()
Double2ObjectMapgetDefaultReturnValue in interface Double2ObjectMap<V>public AbstractDouble2ObjectMap<V> setDefaultReturnValue(V v)
Double2ObjectMapsetDefaultReturnValue in interface Double2ObjectMap<V>v - value that should be the default return valuepublic Double2ObjectMap<V> copy()
Double2ObjectMapcopy in interface Double2ObjectMap<V>@Deprecated public V put(java.lang.Double key, V value)
put in interface java.util.Map<java.lang.Double,V>put in interface Double2ObjectMap<V>put in class java.util.AbstractMap<java.lang.Double,V>public void putAll(Double2ObjectMap<V> m)
Double2ObjectMapputAll in interface Double2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Double,? extends V> m)
public void putAll(double[] keys,
V[] values,
int offset,
int size)
Double2ObjectMapputAll in interface Double2ObjectMap<V>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(java.lang.Double[] keys,
V[] values,
int offset,
int size)
Double2ObjectMapputAll in interface Double2ObjectMap<V>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(Double2ObjectMap<V> m)
Double2ObjectMapputAllIfAbsent in interface Double2ObjectMap<V>m - elements that should be added if not present.public boolean containsKey(double key)
Double2ObjectMapcontainsKey in interface Double2ObjectMap<V>key - element that is searched forpublic boolean containsValue(java.lang.Object value)
public boolean replace(double key,
V oldValue,
V newValue)
Double2ObjectMapreplace in interface Double2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(double key, V value)
Double2ObjectMapreplace in interface Double2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Double2ObjectMap<V> m)
Double2ObjectMapreplaceObjects in interface Double2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(DoubleObjectUnaryOperator<V> mappingFunction)
Double2ObjectMapreplaceObjects in interface Double2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(double key, DoubleObjectUnaryOperator<V> mappingFunction)
Double2ObjectMapcompute in interface Double2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(double key, DoubleFunction<V> mappingFunction)
Double2ObjectMapcomputeIfAbsent in interface Double2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(double key, ObjectSupplier<V> valueProvider)
Double2ObjectMapsupplyIfAbsent in interface Double2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(double key, DoubleObjectUnaryOperator<V> mappingFunction)
Double2ObjectMapcomputeIfPresent in interface Double2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(double key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Double2ObjectMapmerge in interface Double2ObjectMap<V>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 mergeAll(Double2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Double2ObjectMapmergeAll in interface Double2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Double,V>get in interface Double2ObjectMap<V>get in class java.util.AbstractMap<java.lang.Double,V>public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Double,V>getOrDefault in interface Double2ObjectMap<V>public V getOrDefault(double key, V defaultValue)
Double2ObjectMapgetOrDefault in interface Double2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Double,V>remove in interface Double2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Double,V>key - the element that should be removedMap.remove(Object)public void forEach(DoubleObjectConsumer<V> action)
Double2ObjectMapforEach in interface Double2ObjectMap<V>action - processor of the values that are iterator overpublic DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,V>keySet in interface Double2ObjectMap<V>keySet in class java.util.AbstractMap<java.lang.Double,V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Double,V>values in interface Double2ObjectMap<V>values in class java.util.AbstractMap<java.lang.Double,V>public ObjectSet<java.util.Map.Entry<java.lang.Double,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Double,V>entrySet in interface Double2ObjectMap<V>entrySet in class java.util.AbstractMap<java.lang.Double,V>public boolean equals(java.lang.Object o)