public static class Long2DoubleMaps.UnmodifyableMap extends AbstractLong2DoubleMap implements Long2DoubleMap
AbstractLong2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2DoubleMap.BuilderCache, Long2DoubleMap.Entry, Long2DoubleMap.FastEntrySet, Long2DoubleMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
double |
addTo(long key,
double value)
A Helper method to add a primitives together.
|
void |
clear() |
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
|
Long2DoubleMap |
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.
|
void |
replaceDoubles(Long2DoubleMap m)
Type-Specific bulk replace method.
|
void |
replaceDoubles(LongDoubleUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
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, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiableapplyAsDoublepublic double put(long key,
double value)
Long2DoubleMapput in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(long key,
double value)
Long2DoubleMapputIfAbsent in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(long key,
double value)
Long2DoubleMapaddTo in interface 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 removedsubFrom in interface Long2DoubleMapkey - that should be subtract fromvalue - that should be subtractpublic double remove(long key)
Long2DoubleMapremove in interface Long2DoubleMapkey - the element that should be removedpublic double removeOrDefault(long key,
double defaultValue)
Long2DoubleMapremoveOrDefault in interface 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)
Long2DoubleMapremove in interface Long2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double get(long key)
Long2DoubleMapget in interface Long2DoubleFunctionget in interface 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 void replaceDoubles(LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapreplaceDoubles in interface Long2DoubleMapreplaceDoubles in class AbstractLong2DoubleMapmappingFunction - operation to replace all valuespublic void replaceDoubles(Long2DoubleMap m)
Long2DoubleMapreplaceDoubles in interface Long2DoubleMapreplaceDoubles in class AbstractLong2DoubleMapm - elements that should be replaced.public Long2DoubleMap copy()
Long2DoubleMapcopy in interface Long2DoubleMapcopy in class AbstractLong2DoubleMappublic void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public 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()
Long2DoubleMaplong2DoubleEntrySet in interface Long2DoubleMap