public static class Double2LongMaps.SynchronizedMap extends AbstractDouble2LongMap implements Double2LongMap
AbstractDouble2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2LongMap.BuilderCache, Double2LongMap.Entry, Double2LongMap.FastEntrySet, Double2LongMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
long |
addTo(double key,
long value)
A Helper method to add a primitives together.
|
void |
addToAll(Double2LongMap m)
A Helper method to bulk add primitives together.
|
void |
clear()
Deprecated.
|
java.lang.Long |
compute(java.lang.Double key,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfAbsent(java.lang.Double key,
java.util.function.Function<? super java.lang.Double,? extends java.lang.Long> mappingFunction)
Deprecated.
|
java.lang.Long |
computeIfPresent(java.lang.Double key,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
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
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(long value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
Double2LongMap |
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.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Double,? super java.lang.Long> action)
Deprecated.
|
void |
forEach(DoubleLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
long |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key)
Deprecated.
|
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getOrDefault(double key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
Deprecated.
|
DoubleSet |
keySet() |
java.lang.Long |
merge(java.lang.Double key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
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
|
java.lang.Long |
put(java.lang.Double key,
java.lang.Long value)
Deprecated.
|
void |
putAll(double[] keys,
long[] 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(Double2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Long> m) |
void |
putAllIfAbsent(Double2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
long |
putIfAbsent(double key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
java.lang.Long |
putIfAbsent(java.lang.Double key,
java.lang.Long value)
Deprecated.
|
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
|
java.lang.Long |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
long |
removeOrDefault(double key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
replace(double key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
java.lang.Long |
replace(java.lang.Double key,
java.lang.Long value)
Deprecated.
|
boolean |
replace(double key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Double key,
java.lang.Long oldValue,
java.lang.Long newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
Deprecated.
|
void |
replaceLongs(Double2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(DoubleLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractDouble2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
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() |
entrySet, equals, hashCode, putAllapplyAsLong, builder, entrySet, put, put, putAll, putAll, putAll, synchronize, synchronize, unmodifiablepublic long getDefaultReturnValue()
Double2LongMapgetDefaultReturnValue in interface Double2LongMapgetDefaultReturnValue in class AbstractDouble2LongMappublic AbstractDouble2LongMap setDefaultReturnValue(long v)
Double2LongMapsetDefaultReturnValue in interface Double2LongMapsetDefaultReturnValue in class AbstractDouble2LongMapv - value that should be the default return valuepublic long put(double key,
long value)
Double2LongMapput in interface Double2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(double key,
long value)
Double2LongMapputIfAbsent in interface Double2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Double2LongMap m)
Double2LongMapputAllIfAbsent in interface Double2LongMapputAllIfAbsent in class AbstractDouble2LongMapm - elements that should be added if not present.public long addTo(double key,
long value)
Double2LongMapaddTo in interface 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 removedsubFrom in interface Double2LongMapkey - that should be subtract fromvalue - that should be subtractpublic void addToAll(Double2LongMap m)
Double2LongMapaddToAll in interface Double2LongMapaddToAll in class AbstractDouble2LongMapm - the values that should be added/insertedpublic void putAll(Double2LongMap m)
Double2LongMapputAll in interface Double2LongMapputAll in class AbstractDouble2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Double,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Double,java.lang.Long>putAll in class AbstractDouble2LongMappublic void putAll(double[] keys,
long[] values,
int offset,
int size)
Double2LongMapputAll in interface Double2LongMapputAll in class AbstractDouble2LongMapkeys - 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 boolean containsKey(double key)
Double2LongMapcontainsKey in interface Double2LongMapcontainsKey in class AbstractDouble2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Double2LongMapcontainsValue in interface Double2LongMapcontainsValue in class AbstractDouble2LongMapvalue - element that is searched forpublic long get(double key)
Double2LongMapget in interface Double2LongMapkey - the key that is searched forpublic long remove(double key)
Double2LongMapremove in interface Double2LongMapkey - the element that should be removedpublic long removeOrDefault(double key,
long defaultValue)
Double2LongMapremoveOrDefault in interface 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)
Double2LongMapremove in interface Double2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(double key,
long oldValue,
long newValue)
Double2LongMapreplace in interface Double2LongMapreplace in class AbstractDouble2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(double key,
long value)
Double2LongMapreplace in interface Double2LongMapreplace in class AbstractDouble2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Double2LongMap m)
Double2LongMapreplaceLongs in interface Double2LongMapreplaceLongs in class AbstractDouble2LongMapm - elements that should be replaced.public void replaceLongs(DoubleLongUnaryOperator mappingFunction)
Double2LongMapreplaceLongs in interface Double2LongMapreplaceLongs in class AbstractDouble2LongMapmappingFunction - operation to replace all valuespublic 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 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 void forEach(DoubleLongConsumer action)
Double2LongMapforEach in interface Double2LongMapforEach in class AbstractDouble2LongMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Double,java.lang.Long>size in class java.util.AbstractMap<java.lang.Double,java.lang.Long>public Double2LongMap copy()
Double2LongMapcopy in interface Double2LongMapcopy in class AbstractDouble2LongMappublic 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()
Double2LongMapdouble2LongEntrySet in interface Double2LongMap@Deprecated public java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Double,java.lang.Long>get in interface Double2LongMapget in class AbstractDouble2LongMap@Deprecated
public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Double,java.lang.Long>getOrDefault in interface Double2LongMapgetOrDefault in class AbstractDouble2LongMap@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Double,java.lang.Long>containsValue in interface Double2LongMapcontainsValue in class java.util.AbstractMap<java.lang.Double,java.lang.Long>value - that is searched for.Map.containsValue(Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Double,java.lang.Long>containsKey in interface Double2LongMapcontainsKey in class java.util.AbstractMap<java.lang.Double,java.lang.Long>key - that is searched for.Map.containsKey(Object)@Deprecated
public java.lang.Long put(java.lang.Double key,
java.lang.Long value)
put in interface java.util.Map<java.lang.Double,java.lang.Long>put in interface Double2LongMapput in class AbstractDouble2LongMap@Deprecated public java.lang.Long remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Double,java.lang.Long>remove in interface Double2LongMapremove in class AbstractDouble2LongMapkey - the element that should be removedMap.remove(Object)@Deprecated public void clear()
clear in interface java.util.Map<java.lang.Double,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Double,java.lang.Long>@Deprecated
public java.lang.Long putIfAbsent(java.lang.Double key,
java.lang.Long value)
putIfAbsent in interface java.util.Map<java.lang.Double,java.lang.Long>putIfAbsent in interface Double2LongMap@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Double,java.lang.Long>remove in interface Double2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Double key,
java.lang.Long oldValue,
java.lang.Long newValue)
replace in interface java.util.Map<java.lang.Double,java.lang.Long>replace in interface Double2LongMap@Deprecated
public java.lang.Long replace(java.lang.Double key,
java.lang.Long value)
replace in interface java.util.Map<java.lang.Double,java.lang.Long>replace in interface Double2LongMap@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Double,java.lang.Long>replaceAll in interface Double2LongMap@Deprecated
public java.lang.Long compute(java.lang.Double key,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
compute in interface java.util.Map<java.lang.Double,java.lang.Long>compute in interface Double2LongMap@Deprecated
public java.lang.Long computeIfAbsent(java.lang.Double key,
java.util.function.Function<? super java.lang.Double,? extends java.lang.Long> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Double,java.lang.Long>computeIfAbsent in interface Double2LongMap@Deprecated
public java.lang.Long computeIfPresent(java.lang.Double key,
java.util.function.BiFunction<? super java.lang.Double,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Double,java.lang.Long>computeIfPresent in interface Double2LongMap@Deprecated
public java.lang.Long merge(java.lang.Double key,
java.lang.Long value,
java.util.function.BiFunction<? super java.lang.Long,? super java.lang.Long,? extends java.lang.Long> mappingFunction)
merge in interface java.util.Map<java.lang.Double,java.lang.Long>merge in interface Double2LongMap@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Double,? super java.lang.Long> action)
forEach in interface java.util.Map<java.lang.Double,java.lang.Long>forEach in interface Double2LongMap