public class Int2DoubleConcurrentOpenHashMap extends AbstractInt2DoubleMap implements Int2DoubleConcurrentMap, ITrimmable
AbstractInt2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2DoubleMap.BuilderCache, Int2DoubleMap.Entry, Int2DoubleMap.FastEntrySet, Int2DoubleMap.MapBuilder| Constructor and Description |
|---|
Int2DoubleConcurrentOpenHashMap()
Default Constructor
|
Int2DoubleConcurrentOpenHashMap(float loadFactor,
int concurrencyLevel)
Constructor that defines the load factor and concurrencyLevel
|
Int2DoubleConcurrentOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values)
Helper constructor that allow to create a map from unboxed values
|
Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values,
float loadFactor,
int concurrencyLevel)
Helper constructor that allow to create a map from unboxed values
|
Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values,
int concurrencyLevel)
Helper constructor that allow to create a map from unboxed values
|
Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map,
float loadFactor)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map,
float loadFactor,
int concurrencyLevel)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map,
int concurrencyLevel)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values,
float loadFactor,
int concurrencyLevel)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values,
int concurrencyLevel)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2DoubleConcurrentOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Int2DoubleConcurrentOpenHashMap(int minCapacity,
float loadFactor,
int concurrencyLevel)
Constructor that defines the minimum capacity, load factor and concurrencyLevel
|
Int2DoubleConcurrentOpenHashMap(int minCapacity,
int concurrencyLevel)
Constructor that defines the minimum capacity and concurrencyLevel
|
Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
float loadFactor)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
float loadFactor,
int concurrencyLevel)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
int concurrencyLevel)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
double |
addTo(int key,
double value)
A Helper method to add a primitives together.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
double |
computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(double value)
Type Specific method to reduce boxing/unboxing of values
|
Int2DoubleConcurrentOpenHashMap |
copy()
A Function that does a shallow clone of the Map itself.
|
void |
forEach(IntDoubleConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
double |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
java.lang.Double |
get(java.lang.Object key) |
double |
getOrDefault(int key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2DoubleMap.Entry> |
int2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
boolean |
isEmpty() |
IntSet |
keySet() |
double |
mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
double |
put(int key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(int key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
double |
removeOrDefault(int key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
double |
replace(int key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
double |
subFrom(int key,
double value)
A Helper method to subtract from primitive from each other.
|
double |
supplyDoubleIfAbsent(int key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
DoubleCollection |
values() |
addToAll, entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, mergeAllDouble, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceDoubles, replaceDoubles, setDefaultReturnValuecompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, replace, replace, replaceAlladdToAll, applyAsDouble, builder, containsKey, containsValue, entrySet, getDefaultReturnValue, mergeAllDouble, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceDoubles, replaceDoubles, setDefaultReturnValue, synchronize, synchronize, unmodifiableclearAndTrim, trimpublic Int2DoubleConcurrentOpenHashMap()
public Int2DoubleConcurrentOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Int2DoubleConcurrentOpenHashMap(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2DoubleConcurrentOpenHashMap(int minCapacity,
int concurrencyLevel)
minCapacity - the minimum capacity the HashMap is allowed to be.concurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(float loadFactor,
int concurrencyLevel)
loadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(int minCapacity,
float loadFactor,
int concurrencyLevel)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values,
float loadFactor)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values,
int concurrencyLevel)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.concurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(java.lang.Integer[] keys,
java.lang.Double[] values,
float loadFactor,
int concurrencyLevel)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values,
float loadFactor)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values,
int concurrencyLevel)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.concurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(int[] keys,
double[] values,
float loadFactor,
int concurrencyLevel)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map)
map - the values that should be present in the mappublic Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
int concurrencyLevel)
map - the values that should be present in the mapconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Double> map,
float loadFactor,
int concurrencyLevel)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map)
map - the values that should be present in the mappublic Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map, int concurrencyLevel)
map - the values that should be present in the mapconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public Int2DoubleConcurrentOpenHashMap(Int2DoubleMap map, float loadFactor, int concurrencyLevel)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizeconcurrencyLevel - decides how many operations can be performed at once.java.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if the concurrencyLevel is either below/equal to 0 or above/equal to 65535public double put(int key,
double value)
Int2DoubleMapput in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(int key,
double value)
Int2DoubleMapputIfAbsent in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(int key,
double value)
Int2DoubleMapaddTo in interface Int2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(int key,
double value)
Int2DoubleMapInt2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2DoubleMapkey - that should be subtract fromvalue - that should be subtractpublic double remove(int key)
Int2DoubleMapremove in interface Int2DoubleMapkey - the element that should be removedpublic boolean remove(int key,
double value)
Int2DoubleMapremove in interface Int2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.concurrent.ConcurrentMap<java.lang.Integer,java.lang.Double>remove in interface java.util.Map<java.lang.Integer,java.lang.Double>remove in interface Int2DoubleConcurrentMapremove in interface Int2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public double removeOrDefault(int key,
double defaultValue)
Int2DoubleMapremoveOrDefault in interface Int2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public double get(int key)
Int2DoubleMapget in interface Int2DoubleMapkey - the key that is searched forpublic java.lang.Double get(java.lang.Object key)
get in interface java.util.Map<java.lang.Integer,java.lang.Double>get in interface Int2DoubleMapget in class AbstractInt2DoubleMappublic double getOrDefault(int key,
double defaultValue)
Int2DoubleMapgetOrDefault in interface Int2DoubleMapgetOrDefault in class AbstractInt2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(IntDoubleConsumer action)
Int2DoubleMapforEach in interface Int2DoubleMapforEach in class AbstractInt2DoubleMapaction - processor of the values that are iterator overpublic Int2DoubleConcurrentOpenHashMap copy()
Int2DoubleMapcopy in interface Int2DoubleMapcopy in class AbstractInt2DoubleMappublic boolean containsKey(int key)
Int2DoubleMapcontainsKey in interface Int2DoubleMapcontainsKey in class AbstractInt2DoubleMapkey - element that is searched forpublic boolean containsValue(double value)
Int2DoubleMapcontainsValue in interface Int2DoubleMapcontainsValue in class AbstractInt2DoubleMapvalue - element that is searched forpublic boolean replace(int key,
double oldValue,
double newValue)
Int2DoubleMapreplace in interface Int2DoubleMapreplace in class AbstractInt2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(int key,
double value)
Int2DoubleMapreplace in interface Int2DoubleMapreplace in class AbstractInt2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public double computeDouble(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDouble in interface Int2DoubleMapcomputeDouble in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(int key,
Int2DoubleFunction mappingFunction)
Int2DoubleMapcomputeDoubleIfAbsent in interface Int2DoubleMapcomputeDoubleIfAbsent in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double supplyDoubleIfAbsent(int key,
DoubleSupplier valueProvider)
Int2DoubleMapsupplyDoubleIfAbsent in interface Int2DoubleMapsupplyDoubleIfAbsent in class AbstractInt2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double computeDoubleIfPresent(int key,
IntDoubleUnaryOperator mappingFunction)
Int2DoubleMapcomputeDoubleIfPresent in interface Int2DoubleMapcomputeDoubleIfPresent in class AbstractInt2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(int key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Int2DoubleMapmergeDouble in interface Int2DoubleMapmergeDouble in class AbstractInt2DoubleMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic boolean isEmpty()
isEmpty in interface java.util.Map<java.lang.Integer,java.lang.Double>isEmpty in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Double>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>public ObjectSet<Int2DoubleMap.Entry> int2DoubleEntrySet()
Int2DoubleMapint2DoubleEntrySet in interface Int2DoubleMappublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Double>keySet in interface Int2DoubleMapkeySet in class AbstractInt2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Double>values in interface Int2DoubleMapvalues in class AbstractInt2DoubleMap