public abstract class AbstractLong2DoubleMap extends java.util.AbstractMap<java.lang.Long,java.lang.Double> implements Long2DoubleMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractLong2DoubleMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2DoubleMap.Entry, Long2DoubleMap.FastEntrySet| Constructor and Description |
|---|
AbstractLong2DoubleMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Long2DoubleMap m)
A Helper method to bulk add primitives together.
|
double |
computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(long key,
LongDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Double>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(LongDoubleConsumer 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(long 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() |
LongSet |
keySet() |
void |
mergeAllDouble(Long2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
putAll(long[] 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(Long2DoubleMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> m) |
void |
putAllIfAbsent(Long2DoubleMap m)
Type-Specific bulk put method put elements into the map if not present.
|
double |
replace(long key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(long key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceDoubles(Long2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(LongDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2DoubleMap |
setDefaultReturnValue(double v)
Method to define the default return value if a requested key isn't present
|
DoubleCollection |
values() |
clear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddTo, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getDouble, long2DoubleEntrySet, merge, put, put, putAll, putIfAbsent, putIfAbsent, remLong, remLongOrDefault, remove, remove, remove, replace, replace, replaceAllapplyAsDoublepublic double getDefaultReturnValue()
Long2DoubleMapgetDefaultReturnValue in interface Long2DoubleMappublic AbstractLong2DoubleMap setDefaultReturnValue(double v)
Long2DoubleMapsetDefaultReturnValue in interface Long2DoubleMapv - value that should be the default return valuepublic void addToAll(Long2DoubleMap m)
Long2DoubleMapaddToAll in interface Long2DoubleMapm - the values that should be added/insertedpublic void putAll(Long2DoubleMap m)
Long2DoubleMapputAll in interface Long2DoubleMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Double>putAll in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public void putAll(long[] keys,
double[] values,
int offset,
int size)
Long2DoubleMapputAll in interface Long2DoubleMapkeys - 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(Long2DoubleMap m)
Long2DoubleMapputAllIfAbsent in interface Long2DoubleMapm - elements that should be added if not present.public boolean containsKey(long key)
Long2DoubleMapcontainsKey in interface Long2DoubleMapkey - element that is searched forpublic boolean containsValue(double value)
Long2DoubleMapcontainsValue in interface Long2DoubleMapvalue - element that is searched forpublic boolean replace(long key,
double oldValue,
double newValue)
Long2DoubleMapreplace in interface Long2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(long key,
double value)
Long2DoubleMapreplace in interface Long2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public void replaceDoubles(Long2DoubleMap m)
Long2DoubleMapreplaceDoubles in interface Long2DoubleMapm - elements that should be replaced.public void replaceDoubles(LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapreplaceDoubles in interface Long2DoubleMapmappingFunction - operation to replace all valuespublic double computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDouble in interface Long2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
Long2DoubleMapcomputeDoubleIfAbsent in interface Long2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double computeDoubleIfPresent(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDoubleIfPresent in interface Long2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeDouble in interface Long2DoubleMapkey - 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(Long2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeAllDouble in interface Long2DoubleMapm - 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.Long,java.lang.Double>get in interface Long2DoubleMapget in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public java.lang.Double getOrDefault(java.lang.Object key,
java.lang.Double defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Double>getOrDefault in interface Long2DoubleMappublic double getOrDefault(long key,
double defaultValue)
Long2DoubleMapgetOrDefault in interface Long2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongDoubleConsumer action)
Long2DoubleMapforEach in interface Long2DoubleMapaction - processor of the values that are iterator overpublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Double>keySet in interface Long2DoubleMapkeySet in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public DoubleCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Double>values in interface Long2DoubleMapvalues in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Double>> entrySet()
entrySet in interface java.util.Map<java.lang.Long,java.lang.Double>entrySet in interface Long2DoubleMapentrySet in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Long,java.lang.Double>equals in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public int hashCode()
hashCode in interface java.util.Map<java.lang.Long,java.lang.Double>hashCode in class java.util.AbstractMap<java.lang.Long,java.lang.Double>