public abstract class AbstractInt2DoubleMap extends java.util.AbstractMap<java.lang.Integer,java.lang.Double> implements Int2DoubleMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractInt2DoubleMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2DoubleMap.BuilderCache, Int2DoubleMap.Entry, Int2DoubleMap.FastEntrySet, Int2DoubleMap.MapBuilder| Constructor and Description |
|---|
AbstractInt2DoubleMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Int2DoubleMap m)
A Helper method to bulk add primitives together.
|
double |
computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
Int2DoubleMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Integer,java.lang.Double>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(IntDoubleConsumer 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.
|
double |
getOrDefault(int key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Double |
getOrDefault(java.lang.Object key,
java.lang.Double defaultValue) |
int |
hashCode() |
IntSet |
keySet() |
void |
mergeAllDouble(Int2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
java.lang.Double |
put(java.lang.Integer key,
java.lang.Double value)
Deprecated.
|
void |
putAll(int[] 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(Int2DoubleMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.lang.Integer[] 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 |
putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> m) |
void |
putAllIfAbsent(Int2DoubleMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Double |
remove(java.lang.Object key) |
double |
replace(int key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceDoubles(Int2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(IntDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractInt2DoubleMap |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
double |
supplyDoubleIfAbsent(int key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
DoubleCollection |
values() |
clear, containsKey, containsValue, isEmpty, size, toStringaddTo, applyAsDouble, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, int2DoubleEntrySet, merge, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic double getDefaultReturnValue()
Int2DoubleMapgetDefaultReturnValue in interface Int2DoubleMappublic AbstractInt2DoubleMap setDefaultReturnValue(double v)
Int2DoubleMapsetDefaultReturnValue in interface Int2DoubleMapv - value that should be the default return valuepublic Int2DoubleMap copy()
Int2DoubleMapcopy in interface Int2DoubleMap@Deprecated
public java.lang.Double put(java.lang.Integer key,
java.lang.Double value)
put in interface java.util.Map<java.lang.Integer,java.lang.Double>put in interface Int2DoubleMapput in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public void addToAll(Int2DoubleMap m)
Int2DoubleMapaddToAll in interface Int2DoubleMapm - the values that should be added/insertedpublic void putAll(Int2DoubleMap m)
Int2DoubleMapputAll in interface Int2DoubleMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> m)
putAll in interface java.util.Map<java.lang.Integer,java.lang.Double>putAll in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public void putAll(int[] keys,
double[] values,
int offset,
int size)
Int2DoubleMapputAll in interface Int2DoubleMapkeys - 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.Integer[] keys,
java.lang.Double[] values,
int offset,
int size)
Int2DoubleMapputAll in interface Int2DoubleMapkeys - 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(Int2DoubleMap m)
Int2DoubleMapputAllIfAbsent in interface Int2DoubleMapm - elements that should be added if not present.public boolean containsKey(int key)
Int2DoubleMapcontainsKey in interface Int2DoubleMapkey - element that is searched forpublic boolean containsValue(double value)
Int2DoubleMapcontainsValue in interface Int2DoubleMapvalue - element that is searched forpublic boolean replace(int key,
double oldValue,
double newValue)
Int2DoubleMapreplace in interface Int2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(int key,
double value)
Int2DoubleMapreplace in interface Int2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public void replaceDoubles(Int2DoubleMap m)
Int2DoubleMapreplaceDoubles in interface Int2DoubleMapm - elements that should be replaced.public void replaceDoubles(IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapreplaceDoubles in interface Int2DoubleMapmappingFunction - operation to replace all valuespublic double computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDouble in interface Int2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
Int2DoubleMapcomputeDoubleIfAbsent in interface Int2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double supplyDoubleIfAbsent(int key,
DoubleSupplier valueProvider)
Int2DoubleMapsupplyDoubleIfAbsent in interface Int2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDoubleIfPresent in interface Int2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeDouble in interface Int2DoubleMapkey - 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(Int2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeAllDouble in interface Int2DoubleMapm - 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<java.lang.Integer,java.lang.Double>get in interface Int2DoubleMapget in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<java.lang.Integer,java.lang.Double>getOrDefault in interface Int2DoubleMappublic double getOrDefault(int key,
double defaultValue)
Int2DoubleMapgetOrDefault in interface Int2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic java.lang.Double remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Integer,java.lang.Double>remove in interface Int2DoubleMapremove in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>key - the element that should be removedMap.remove(Object)public void forEach(IntDoubleConsumer action)
Int2DoubleMapforEach in interface Int2DoubleMapaction - processor of the values that are iterator overpublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Double>keySet in interface Int2DoubleMapkeySet in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public DoubleCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Double>values in interface Int2DoubleMapvalues in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public ObjectSet<java.util.Map.Entry<java.lang.Integer,java.lang.Double>> entrySet()
entrySet in interface java.util.Map<java.lang.Integer,java.lang.Double>entrySet in interface Int2DoubleMapentrySet in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Integer,java.lang.Double>equals in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public int hashCode()
hashCode in interface java.util.Map<java.lang.Integer,java.lang.Double>hashCode in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>