public class Float2FloatArrayMap extends AbstractFloat2FloatMap implements Float2FloatSortedMap
AbstractFloat2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2FloatSortedMap.FastSortedSetFloat2FloatMap.Entry, Float2FloatMap.FastEntrySet| Constructor and Description |
|---|
Float2FloatArrayMap()
Default Constructor
|
Float2FloatArrayMap(float[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Float2FloatArrayMap(java.lang.Float[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Float2FloatArrayMap(float[] keys,
float[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Float2FloatArrayMap(java.lang.Float[] 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
|
Float2FloatArrayMap(Float2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Float2FloatArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Float2FloatArrayMap(java.util.Map<? extends java.lang.Float,? 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(float key,
float value)
A Helper method to add a primitives together.
|
void |
clear() |
FloatComparator |
comparator() |
float |
computeFloat(float key,
FloatFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(float key,
Float2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(float key,
FloatFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(float 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) |
float |
firstFloatKey()
A method to get the first Key of a Map.
|
float |
firstFloatValue()
A method to get the first Value of a Map.
|
ObjectSortedSet<Float2FloatMap.Entry> |
float2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
forEach(FloatFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
getAndMoveToFirst(float key)
A Specific get method that allows to move teh given key/value int the first index.
|
float |
getAndMoveToLast(float key)
A Specific get method that allows to move teh given key/value int the last index.
|
float |
getFloat(float key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(float key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Float2FloatSortedMap |
headMap(float toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
FloatSet |
keySet() |
float |
lastFloatKey()
A method to get the last Key of a Map.
|
float |
lastFloatValue()
A method to get the last Value of a Map.
|
void |
mergeAllFloat(Float2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(float key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(float key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(float key)
A specific move method to move a given key/value to the last index.
|
float |
pollFirstFloatKey()
A method to get and remove the first Key of a Map.
|
float |
pollLastFloatKey()
A method to get and remove the last Key of a Map.
|
float |
put(float key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putAndMoveToFirst(float key,
float value)
A customized put method that allows you to insert into the first index.
|
float |
putAndMoveToLast(float key,
float value)
A customized put method that allows you to insert into the last index.
|
float |
putIfAbsent(float key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remFloat(float key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remFloatOrDefault(float key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(float 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(float key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(float key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
Float2FloatSortedMap |
subMap(float fromKey,
float toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Float2FloatSortedMap |
tailMap(float 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 Float2FloatArrayMap()
public Float2FloatArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Float2FloatArrayMap(java.lang.Float[] 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 Float2FloatArrayMap(java.lang.Float[] 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 Float2FloatArrayMap(float[] 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 Float2FloatArrayMap(float[] 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 Float2FloatArrayMap(java.util.Map<? extends java.lang.Float,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Float2FloatArrayMap(Float2FloatMap map)
map - the values that should be present in the mappublic float put(float key,
float value)
Float2FloatMapput in interface Float2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(float key,
float value)
Float2FloatMapputIfAbsent in interface Float2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(float key,
float value)
Float2FloatMapaddTo in interface Float2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float putAndMoveToFirst(float key,
float value)
Float2FloatSortedMapputAndMoveToFirst in interface Float2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public float putAndMoveToLast(float key,
float value)
Float2FloatSortedMapputAndMoveToLast in interface Float2FloatSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(float key)
Float2FloatSortedMapmoveToFirst in interface Float2FloatSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(float key)
Float2FloatSortedMapmoveToLast in interface Float2FloatSortedMapkey - that should be moved to the first lastpublic boolean containsKey(float key)
Float2FloatMapcontainsKey in interface Float2FloatMapcontainsKey in class AbstractFloat2FloatMapkey - element that is searched forpublic boolean containsValue(float value)
Float2FloatMapcontainsValue in interface Float2FloatMapcontainsValue in class AbstractFloat2FloatMapvalue - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Float,java.lang.Float>containsKey in interface Float2FloatMapcontainsKey in class java.util.AbstractMap<java.lang.Float,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.Float,java.lang.Float>containsValue in interface Float2FloatMapcontainsValue in class java.util.AbstractMap<java.lang.Float,java.lang.Float>value - that is searched for.Map.containsValue(Object)public float getFloat(float key)
Float2FloatMapgetFloat in interface Float2FloatFunctiongetFloat in interface Float2FloatMapkey - the key that is searched forpublic float getOrDefault(float key,
float defaultValue)
Float2FloatMapgetOrDefault in interface Float2FloatMapgetOrDefault in class AbstractFloat2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float getAndMoveToFirst(float key)
Float2FloatSortedMapgetAndMoveToFirst in interface Float2FloatSortedMapkey - that is searched forpublic float getAndMoveToLast(float key)
Float2FloatSortedMapgetAndMoveToLast in interface Float2FloatSortedMapkey - that is searched forpublic float firstFloatKey()
Float2FloatSortedMapfirstFloatKey in interface Float2FloatSortedMappublic float lastFloatKey()
Float2FloatSortedMaplastFloatKey in interface Float2FloatSortedMappublic float firstFloatValue()
Float2FloatSortedMapfirstFloatValue in interface Float2FloatSortedMappublic float lastFloatValue()
Float2FloatSortedMaplastFloatValue in interface Float2FloatSortedMappublic float pollFirstFloatKey()
Float2FloatSortedMappollFirstFloatKey in interface Float2FloatSortedMappublic float pollLastFloatKey()
Float2FloatSortedMappollLastFloatKey in interface Float2FloatSortedMappublic float remFloat(float key)
Float2FloatMapremFloat in interface Float2FloatMapkey - the element that should be removedpublic float remFloatOrDefault(float key,
float defaultValue)
Float2FloatMapremFloatOrDefault in interface Float2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(float key,
float value)
Float2FloatMapremove in interface Float2FloatMapkey - 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.Float,java.lang.Float>remove in interface Float2FloatMapremove in class java.util.AbstractMap<java.lang.Float,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.Float,java.lang.Float>remove in interface Float2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(FloatFloatConsumer action)
Float2FloatMapforEach in interface Float2FloatMapforEach in class AbstractFloat2FloatMapaction - processor of the values that are iterator overpublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Float,java.lang.Float>keySet in interface Float2FloatMapkeySet in interface Float2FloatSortedMapkeySet in class AbstractFloat2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Float,java.lang.Float>values in interface java.util.SortedMap<java.lang.Float,java.lang.Float>values in interface Float2FloatMapvalues in interface Float2FloatSortedMapvalues in class AbstractFloat2FloatMappublic ObjectSortedSet<Float2FloatMap.Entry> float2FloatEntrySet()
Float2FloatMapfloat2FloatEntrySet in interface Float2FloatMappublic boolean replace(float key,
float oldValue,
float newValue)
Float2FloatMapreplace in interface Float2FloatMapreplace in class AbstractFloat2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(float key,
float value)
Float2FloatMapreplace in interface Float2FloatMapreplace in class AbstractFloat2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(float key,
FloatFloatUnaryOperator mappingFunction)
Float2FloatMapcomputeFloat in interface Float2FloatMapcomputeFloat in class AbstractFloat2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(float key,
Float2FloatFunction mappingFunction)
Float2FloatMapcomputeFloatIfAbsent in interface Float2FloatMapcomputeFloatIfAbsent in class AbstractFloat2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(float key,
FloatFloatUnaryOperator mappingFunction)
Float2FloatMapcomputeFloatIfPresent in interface Float2FloatMapcomputeFloatIfPresent in class AbstractFloat2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(float key,
float value,
FloatFloatUnaryOperator mappingFunction)
Float2FloatMapmergeFloat in interface Float2FloatMapmergeFloat in class AbstractFloat2FloatMapkey - 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(Float2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Float2FloatMapmergeAllFloat in interface Float2FloatMapmergeAllFloat in class AbstractFloat2FloatMapm - 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.Float,java.lang.Float>size in class java.util.AbstractMap<java.lang.Float,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Float,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Float,java.lang.Float>public FloatComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Float,java.lang.Float>comparator in interface Float2FloatSortedMappublic Float2FloatSortedMap subMap(float fromKey, float toKey)
Float2FloatSortedMapsubMap in interface Float2FloatSortedMapfromKey - where the submap should starttoKey - where the subMap should endpublic Float2FloatSortedMap headMap(float toKey)
Float2FloatSortedMapheadMap in interface Float2FloatSortedMaptoKey - where the headMap should endpublic Float2FloatSortedMap tailMap(float fromKey)
Float2FloatSortedMaptailMap in interface Float2FloatSortedMapfromKey - where the TailMap should start