public static class Double2LongMaps.EmptyMap extends AbstractDouble2LongMap
AbstractDouble2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2LongMap.BuilderCache, Double2LongMap.Entry, Double2LongMap.FastEntrySet, Double2LongMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
long |
addTo(double key,
long value)
A Helper method to add a primitives together.
|
long |
computeLong(double key,
DoubleLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(double key,
Double2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(double key,
DoubleLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Double2LongMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Double2LongMap.Entry> |
double2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
long |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(double key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
DoubleSet |
keySet() |
void |
mergeAllLong(Double2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(double key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
long |
put(double key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(double key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
removeOrDefault(double key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
subFrom(double key,
long value)
A Helper method to subtract from primitive from each other.
|
long |
supplyLongIfAbsent(double key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
LongCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceLongs, replaceLongs, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiableapplyAsLongpublic long put(double key,
long value)
Double2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(double key,
long value)
Double2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(double key,
long value)
Double2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(double key,
long value)
Double2LongMapDouble2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic long remove(double key)
Double2LongMapkey - the element that should be removedpublic long removeOrDefault(double key,
long defaultValue)
Double2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(double key,
long value)
Double2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long get(double key)
Double2LongMapkey - the key that is searched forpublic long getOrDefault(double key,
long defaultValue)
Double2LongMapgetOrDefault in interface Double2LongMapgetOrDefault in class AbstractDouble2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long computeLong(double key,
DoubleLongUnaryOperator mappingFunction)
Double2LongMapcomputeLong in interface Double2LongMapcomputeLong in class AbstractDouble2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(double key,
Double2LongFunction mappingFunction)
Double2LongMapcomputeLongIfAbsent in interface Double2LongMapcomputeLongIfAbsent in class AbstractDouble2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(double key,
DoubleLongUnaryOperator mappingFunction)
Double2LongMapcomputeLongIfPresent in interface Double2LongMapcomputeLongIfPresent in class AbstractDouble2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long supplyLongIfAbsent(double key,
LongSupplier valueProvider)
Double2LongMapsupplyLongIfAbsent in interface Double2LongMapsupplyLongIfAbsent in class AbstractDouble2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long mergeLong(double key,
long value,
LongLongUnaryOperator mappingFunction)
Double2LongMapmergeLong in interface Double2LongMapmergeLong in class AbstractDouble2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Double2LongMap m, LongLongUnaryOperator mappingFunction)
Double2LongMapmergeAllLong in interface Double2LongMapmergeAllLong in class AbstractDouble2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Long>keySet in interface Double2LongMapkeySet in class AbstractDouble2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Long>values in interface Double2LongMapvalues in class AbstractDouble2LongMappublic ObjectSet<Double2LongMap.Entry> double2LongEntrySet()
Double2LongMappublic Double2LongMaps.EmptyMap copy()
Double2LongMapcopy in interface Double2LongMapcopy in class AbstractDouble2LongMap