public static class Long2DoubleMaps.EmptyMap extends AbstractLong2DoubleMap
AbstractLong2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2DoubleMap.BuilderCache, Long2DoubleMap.Entry, Long2DoubleMap.FastEntrySet, Long2DoubleMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(long key,
double value)
A Helper method to add a 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
|
Long2DoubleMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
double |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
double |
getOrDefault(long key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2DoubleMap.Entry> |
long2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
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
|
double |
put(long key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(long key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
removeOrDefault(long key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
double |
subFrom(long key,
double value)
A Helper method to subtract from primitive from each other.
|
double |
supplyDoubleIfAbsent(long key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
DoubleCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceDoubles, replaceDoubles, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsDouble, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic double put(long key,
double value)
Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(long key,
double value)
Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(long key,
double value)
Long2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(long key,
double value)
Long2DoubleMapLong2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic double remove(long key)
Long2DoubleMapkey - the element that should be removedpublic double removeOrDefault(long key,
double defaultValue)
Long2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
double value)
Long2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double get(long key)
Long2DoubleMapkey - the key that is searched forpublic double getOrDefault(long key,
double defaultValue)
Long2DoubleMapgetOrDefault in interface Long2DoubleMapgetOrDefault in class AbstractLong2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic double computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDouble in interface Long2DoubleMapcomputeDouble in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
Long2DoubleMapcomputeDoubleIfAbsent in interface Long2DoubleMapcomputeDoubleIfAbsent in class AbstractLong2DoubleMapkey - 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 Long2DoubleMapcomputeDoubleIfPresent in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double supplyDoubleIfAbsent(long key,
DoubleSupplier valueProvider)
Long2DoubleMapsupplyDoubleIfAbsent in interface Long2DoubleMapsupplyDoubleIfAbsent in class AbstractLong2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeDouble in interface Long2DoubleMapmergeDouble in class AbstractLong2DoubleMapkey - 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 Long2DoubleMapmergeAllDouble in class AbstractLong2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Double>keySet in interface Long2DoubleMapkeySet in class AbstractLong2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Double>values in interface Long2DoubleMapvalues in class AbstractLong2DoubleMappublic ObjectSet<Long2DoubleMap.Entry> long2DoubleEntrySet()
Long2DoubleMappublic Long2DoubleMaps.EmptyMap copy()
Long2DoubleMapcopy in interface Long2DoubleMapcopy in class AbstractLong2DoubleMap