public class Double2FloatArrayMap extends AbstractDouble2FloatMap implements Double2FloatOrderedMap
AbstractDouble2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2FloatOrderedMap.FastOrderedSetDouble2FloatMap.BuilderCache, Double2FloatMap.Entry, Double2FloatMap.FastEntrySet, Double2FloatMap.MapBuilder| Constructor and Description |
|---|
Double2FloatArrayMap()
Default Constructor
|
Double2FloatArrayMap(double[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Double2FloatArrayMap(java.lang.Double[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Double2FloatArrayMap(double[] keys,
float[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Double2FloatArrayMap(java.lang.Double[] keys,
java.lang.Float[] values,
int length)
Helper constructor that allow to create a map from boxed values (it will unbox them) with a custom length
|
Double2FloatArrayMap(Double2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Double2FloatArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Double2FloatArrayMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(double key,
float value)
A Helper method to add a primitives together.
|
void |
clear() |
float |
computeFloat(double key,
DoubleFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(double key,
Double2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(double key,
DoubleFloatUnaryOperator 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) |
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Double2FloatArrayMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectOrderedSet<Double2FloatMap.Entry> |
double2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
double |
firstDoubleKey()
A method to get the first Key of a Map.
|
float |
firstFloatValue()
A method to get the first Value of a Map.
|
void |
forEach(DoubleFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getAndMoveToFirst(double key)
A Specific get method that allows to move teh given key/value int the first index.
|
float |
getAndMoveToLast(double key)
A Specific get method that allows to move teh given key/value int the last index.
|
float |
getOrDefault(double key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
DoubleOrderedSet |
keySet() |
double |
lastDoubleKey()
A method to get the last Key of a Map.
|
float |
lastFloatValue()
A method to get the last Value of a Map.
|
void |
mergeAllFloat(Double2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(double key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(double key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(double key)
A specific move method to move a given key/value to the last index.
|
double |
pollFirstDoubleKey()
A method to get and remove the first Key of a Map.
|
double |
pollLastDoubleKey()
A method to get and remove the last Key of a Map.
|
float |
put(double key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putAndMoveToFirst(double key,
float value)
A customized put method that allows you to insert into the first index.
|
float |
putAndMoveToLast(double key,
float value)
A customized put method that allows you to insert into the last index.
|
float |
putIfAbsent(double key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Float |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
float |
removeOrDefault(double key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(double key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(double key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
float |
subFrom(double key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(double key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
FloatCollection |
values() |
addToAll, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceFloats, replaceFloats, setDefaultReturnValuesynchronize, synchronize, unmodifiableaddToAll, applyAsFloat, builder, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceFloats, replaceFloats, setDefaultReturnValuepublic Double2FloatArrayMap()
public Double2FloatArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Double2FloatArrayMap(java.lang.Double[] keys,
java.lang.Float[] 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 lengthpublic Double2FloatArrayMap(java.lang.Double[] keys,
java.lang.Float[] values,
int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lengthpublic Double2FloatArrayMap(double[] keys,
float[] 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 Double2FloatArrayMap(double[] keys,
float[] values,
int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Double2FloatArrayMap(java.util.Map<? extends java.lang.Double,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Double2FloatArrayMap(Double2FloatMap map)
map - the values that should be present in the mappublic float put(double key,
float value)
Double2FloatMapput in interface Double2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(double key,
float value)
Double2FloatMapputIfAbsent in interface Double2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(double key,
float value)
Double2FloatMapaddTo in interface Double2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(double key,
float value)
Double2FloatMapDouble2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Double2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic float putAndMoveToFirst(double key,
float value)
Double2FloatOrderedMapputAndMoveToFirst in interface Double2FloatOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public float putAndMoveToLast(double key,
float value)
Double2FloatOrderedMapputAndMoveToLast in interface Double2FloatOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(double key)
Double2FloatOrderedMapmoveToFirst in interface Double2FloatOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(double key)
Double2FloatOrderedMapmoveToLast in interface Double2FloatOrderedMapkey - that should be moved to the first lastpublic boolean containsKey(double key)
Double2FloatMapcontainsKey in interface Double2FloatMapcontainsKey in class AbstractDouble2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Double2FloatMapcontainsValue in interface Double2FloatMapcontainsValue in class AbstractDouble2FloatMapvalue - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Double,java.lang.Float>containsKey in interface Double2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Double,java.lang.Float>key - that is searched for.Map.containsKey(Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Double,java.lang.Float>containsValue in interface Double2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Double,java.lang.Float>value - that is searched for.Map.containsValue(Object)public float get(double key)
Double2FloatMapget in interface Double2FloatMapkey - the key that is searched forpublic float getOrDefault(double key,
float defaultValue)
Double2FloatMapgetOrDefault in interface Double2FloatMapgetOrDefault in class AbstractDouble2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float getAndMoveToFirst(double key)
Double2FloatOrderedMapgetAndMoveToFirst in interface Double2FloatOrderedMapkey - that is searched forpublic float getAndMoveToLast(double key)
Double2FloatOrderedMapgetAndMoveToLast in interface Double2FloatOrderedMapkey - that is searched forpublic double firstDoubleKey()
Double2FloatOrderedMapfirstDoubleKey in interface Double2FloatOrderedMappublic double lastDoubleKey()
Double2FloatOrderedMaplastDoubleKey in interface Double2FloatOrderedMappublic float firstFloatValue()
Double2FloatOrderedMapfirstFloatValue in interface Double2FloatOrderedMappublic float lastFloatValue()
Double2FloatOrderedMaplastFloatValue in interface Double2FloatOrderedMappublic double pollFirstDoubleKey()
Double2FloatOrderedMappollFirstDoubleKey in interface Double2FloatOrderedMappublic double pollLastDoubleKey()
Double2FloatOrderedMappollLastDoubleKey in interface Double2FloatOrderedMappublic float remove(double key)
Double2FloatMapremove in interface Double2FloatMapkey - the element that should be removedpublic float removeOrDefault(double key,
float defaultValue)
Double2FloatMapremoveOrDefault in interface Double2FloatMapkey - 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,
float value)
Double2FloatMapremove in interface Double2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public java.lang.Float remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Double,java.lang.Float>remove in interface Double2FloatMapremove in class AbstractDouble2FloatMapkey - the element that should be removedMap.remove(Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Double,java.lang.Float>remove in interface Double2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(DoubleFloatConsumer action)
Double2FloatMapforEach in interface Double2FloatMapforEach in class AbstractDouble2FloatMapaction - processor of the values that are iterator overpublic DoubleOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Float>keySet in interface Double2FloatMapkeySet in interface Double2FloatOrderedMapkeySet in class AbstractDouble2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Float>values in interface Double2FloatMapvalues in class AbstractDouble2FloatMappublic ObjectOrderedSet<Double2FloatMap.Entry> double2FloatEntrySet()
Double2FloatMapdouble2FloatEntrySet in interface Double2FloatMapdouble2FloatEntrySet in interface Double2FloatOrderedMappublic boolean replace(double key,
float oldValue,
float newValue)
Double2FloatMapreplace in interface Double2FloatMapreplace in class AbstractDouble2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(double key,
float value)
Double2FloatMapreplace in interface Double2FloatMapreplace in class AbstractDouble2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(double key,
DoubleFloatUnaryOperator mappingFunction)
Double2FloatMapcomputeFloat in interface Double2FloatMapcomputeFloat in class AbstractDouble2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(double key,
Double2FloatFunction mappingFunction)
Double2FloatMapcomputeFloatIfAbsent in interface Double2FloatMapcomputeFloatIfAbsent in class AbstractDouble2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(double key,
FloatSupplier valueProvider)
Double2FloatMapsupplyFloatIfAbsent in interface Double2FloatMapsupplyFloatIfAbsent in class AbstractDouble2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(double key,
DoubleFloatUnaryOperator mappingFunction)
Double2FloatMapcomputeFloatIfPresent in interface Double2FloatMapcomputeFloatIfPresent in class AbstractDouble2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(double key,
float value,
FloatFloatUnaryOperator mappingFunction)
Double2FloatMapmergeFloat in interface Double2FloatMapmergeFloat in class AbstractDouble2FloatMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllFloat(Double2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Double2FloatMapmergeAllFloat in interface Double2FloatMapmergeAllFloat in class AbstractDouble2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
size in interface java.util.Map<java.lang.Double,java.lang.Float>size in class java.util.AbstractMap<java.lang.Double,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Double,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Double,java.lang.Float>public Double2FloatArrayMap copy()
Double2FloatMapcopy in interface Double2FloatMapcopy in interface Double2FloatOrderedMapcopy in class AbstractDouble2FloatMap