public class Double2FloatArrayMap extends AbstractDouble2FloatMap implements Double2FloatSortedMap
AbstractDouble2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2FloatSortedMap.FastSortedSetDouble2FloatMap.Entry, Double2FloatMap.FastEntrySet| 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() |
DoubleComparator |
comparator() |
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) |
ObjectSortedSet<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 |
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 |
getFloat(double key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(double key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Double2FloatSortedMap |
headMap(double toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
DoubleSet |
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 |
remDouble(double key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remDoubleOrDefault(double key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
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 |
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() |
Double2FloatSortedMap |
subMap(double fromKey,
double toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Double2FloatSortedMap |
tailMap(double fromKey)
A Type Specific TailMap method to reduce boxing/unboxing
|
FloatCollection |
values() |
addToAll, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceFloats, replaceFloats, setDefaultReturnValuefirstKey, headMap, lastKey, subMap, tailMapaddToAll, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, 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 putAndMoveToFirst(double key,
float value)
Double2FloatSortedMapputAndMoveToFirst in interface Double2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public float putAndMoveToLast(double key,
float value)
Double2FloatSortedMapputAndMoveToLast in interface Double2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(double key)
Double2FloatSortedMapmoveToFirst in interface Double2FloatSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(double key)
Double2FloatSortedMapmoveToLast in interface Double2FloatSortedMapkey - 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 getFloat(double key)
Double2FloatMapgetFloat in interface Double2FloatFunctiongetFloat 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)
Double2FloatSortedMapgetAndMoveToFirst in interface Double2FloatSortedMapkey - that is searched forpublic float getAndMoveToLast(double key)
Double2FloatSortedMapgetAndMoveToLast in interface Double2FloatSortedMapkey - that is searched forpublic double firstDoubleKey()
Double2FloatSortedMapfirstDoubleKey in interface Double2FloatSortedMappublic double lastDoubleKey()
Double2FloatSortedMaplastDoubleKey in interface Double2FloatSortedMappublic float firstFloatValue()
Double2FloatSortedMapfirstFloatValue in interface Double2FloatSortedMappublic float lastFloatValue()
Double2FloatSortedMaplastFloatValue in interface Double2FloatSortedMappublic double pollFirstDoubleKey()
Double2FloatSortedMappollFirstDoubleKey in interface Double2FloatSortedMappublic double pollLastDoubleKey()
Double2FloatSortedMappollLastDoubleKey in interface Double2FloatSortedMappublic float remDouble(double key)
Double2FloatMapremDouble in interface Double2FloatMapkey - the element that should be removedpublic float remDoubleOrDefault(double key,
float defaultValue)
Double2FloatMapremDoubleOrDefault 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 java.util.AbstractMap<java.lang.Double,java.lang.Float>key - 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 DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Double,java.lang.Float>keySet in interface Double2FloatMapkeySet in interface Double2FloatSortedMapkeySet in class AbstractDouble2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Float>values in interface java.util.SortedMap<java.lang.Double,java.lang.Float>values in interface Double2FloatMapvalues in interface Double2FloatSortedMapvalues in class AbstractDouble2FloatMappublic ObjectSortedSet<Double2FloatMap.Entry> double2FloatEntrySet()
Double2FloatMapdouble2FloatEntrySet in interface Double2FloatMappublic 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 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 DoubleComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Double,java.lang.Float>comparator in interface Double2FloatSortedMappublic Double2FloatSortedMap subMap(double fromKey, double toKey)
Double2FloatSortedMapsubMap in interface Double2FloatSortedMapfromKey - where the submap should starttoKey - where the subMap should endpublic Double2FloatSortedMap headMap(double toKey)
Double2FloatSortedMapheadMap in interface Double2FloatSortedMaptoKey - where the headMap should endpublic Double2FloatSortedMap tailMap(double fromKey)
Double2FloatSortedMaptailMap in interface Double2FloatSortedMapfromKey - where the TailMap should start