T - the type of elements maintained by this Collectionpublic class Object2FloatArrayMap<T> extends AbstractObject2FloatMap<T> implements Object2FloatSortedMap<T>
AbstractObject2FloatMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2FloatSortedMap.FastSortedSet<T>Object2FloatMap.Entry<T>, Object2FloatMap.FastEntrySet<T>| Constructor and Description |
|---|
Object2FloatArrayMap()
Default Constructor
|
Object2FloatArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Object2FloatArrayMap(java.util.Map<? extends T,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2FloatArrayMap(Object2FloatMap<T> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2FloatArrayMap(T[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2FloatArrayMap(T[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2FloatArrayMap(T[] keys,
float[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Object2FloatArrayMap(T[] 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
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(T key,
float value)
A Helper method to add a primitives together.
|
void |
clear() |
java.util.Comparator<T> |
comparator() |
float |
computeFloat(T key,
ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(T key,
Object2FloatFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(T key,
ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
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 |
firstFloatValue()
A method to get the first Value of a Map.
|
T |
firstKey() |
void |
forEach(ObjectFloatConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
getAndMoveToFirst(T key)
A Specific get method that allows to move teh given key/value int the first index.
|
float |
getAndMoveToLast(T key)
A Specific get method that allows to move teh given key/value int the last index.
|
float |
getFloat(T key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(java.lang.Object key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Object2FloatSortedMap<T> |
headMap(T toKey) |
ObjectSet<T> |
keySet() |
float |
lastFloatValue()
A method to get the last Value of a Map.
|
T |
lastKey() |
void |
mergeAllFloat(Object2FloatMap<T> m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(T key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(T key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(T key)
A specific move method to move a given key/value to the last index.
|
ObjectSortedSet<Object2FloatMap.Entry<T>> |
object2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
T |
pollLastKey()
A method to get and remove the last Key of a Map.
|
float |
put(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putAndMoveToFirst(T key,
float value)
A customized put method that allows you to insert into the first index.
|
float |
putAndMoveToLast(T key,
float value)
A customized put method that allows you to insert into the last index.
|
float |
putIfAbsent(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remOrDefault(T key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
java.lang.Float |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
boolean |
remove(T key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
replace(T key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
Object2FloatSortedMap<T> |
subMap(T fromKey,
T toKey) |
Object2FloatSortedMap<T> |
tailMap(T fromKey) |
FloatCollection |
values() |
addToAll, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceFloats, replaceFloats, setDefaultReturnValueaddToAll, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceFloats, replaceFloats, setDefaultReturnValuepublic Object2FloatArrayMap()
public Object2FloatArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Object2FloatArrayMap(T[] 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 Object2FloatArrayMap(T[] 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 Object2FloatArrayMap(T[] 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 Object2FloatArrayMap(T[] 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 Object2FloatArrayMap(java.util.Map<? extends T,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Object2FloatArrayMap(Object2FloatMap<T> map)
map - the values that should be present in the mappublic float put(T key, float value)
Object2FloatMapput in interface Object2FloatMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(T key, float value)
Object2FloatMapputIfAbsent in interface Object2FloatMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(T key, float value)
Object2FloatMapaddTo in interface Object2FloatMap<T>key - the key that should be inserted,value - the value that should be inserted / addedpublic float putAndMoveToFirst(T key, float value)
Object2FloatSortedMapputAndMoveToFirst in interface Object2FloatSortedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public float putAndMoveToLast(T key, float value)
Object2FloatSortedMapputAndMoveToLast in interface Object2FloatSortedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2FloatSortedMapmoveToFirst in interface Object2FloatSortedMap<T>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2FloatSortedMapmoveToLast in interface Object2FloatSortedMap<T>key - that should be moved to the first lastpublic boolean containsValue(float value)
Object2FloatMapcontainsValue in interface Object2FloatMap<T>containsValue in class AbstractObject2FloatMap<T>value - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Float>containsKey in class AbstractObject2FloatMap<T>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<T,java.lang.Float>containsValue in interface Object2FloatMap<T>containsValue in class java.util.AbstractMap<T,java.lang.Float>value - that is searched for.Map.containsValue(Object)public float getFloat(T key)
Object2FloatMapgetFloat in interface Object2FloatFunction<T>getFloat in interface Object2FloatMap<T>key - the key that is searched forpublic float getOrDefault(java.lang.Object key,
float defaultValue)
Object2FloatMapgetOrDefault in interface Object2FloatMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float getAndMoveToFirst(T key)
Object2FloatSortedMapgetAndMoveToFirst in interface Object2FloatSortedMap<T>key - that is searched forpublic float getAndMoveToLast(T key)
Object2FloatSortedMapgetAndMoveToLast in interface Object2FloatSortedMap<T>key - that is searched forpublic T firstKey()
firstKey in interface java.util.SortedMap<T,java.lang.Float>public T lastKey()
lastKey in interface java.util.SortedMap<T,java.lang.Float>public float firstFloatValue()
Object2FloatSortedMapfirstFloatValue in interface Object2FloatSortedMap<T>public float lastFloatValue()
Object2FloatSortedMaplastFloatValue in interface Object2FloatSortedMap<T>public T pollFirstKey()
Object2FloatSortedMappollFirstKey in interface Object2FloatSortedMap<T>public T pollLastKey()
Object2FloatSortedMappollLastKey in interface Object2FloatSortedMap<T>public float rem(T key)
Object2FloatMaprem in interface Object2FloatMap<T>key - the element that should be removedpublic float remOrDefault(T key, float defaultValue)
Object2FloatMapremOrDefault in interface Object2FloatMap<T>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, float value)
Object2FloatMapremove in interface Object2FloatMap<T>key - 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<T,java.lang.Float>remove in interface Object2FloatMap<T>remove in class java.util.AbstractMap<T,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<T,java.lang.Float>remove in interface Object2FloatMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(ObjectFloatConsumer<T> action)
Object2FloatMapforEach in interface Object2FloatMap<T>forEach in class AbstractObject2FloatMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Float>keySet in interface java.util.SortedMap<T,java.lang.Float>keySet in interface Object2FloatMap<T>keySet in interface Object2FloatSortedMap<T>keySet in class AbstractObject2FloatMap<T>public FloatCollection values()
values in interface java.util.Map<T,java.lang.Float>values in interface java.util.SortedMap<T,java.lang.Float>values in interface Object2FloatMap<T>values in interface Object2FloatSortedMap<T>values in class AbstractObject2FloatMap<T>public ObjectSortedSet<Object2FloatMap.Entry<T>> object2FloatEntrySet()
Object2FloatMapobject2FloatEntrySet in interface Object2FloatMap<T>public boolean replace(T key, float oldValue, float newValue)
Object2FloatMapreplace in interface Object2FloatMap<T>replace in class AbstractObject2FloatMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(T key, float value)
Object2FloatMapreplace in interface Object2FloatMap<T>replace in class AbstractObject2FloatMap<T>key - the element that should be searched forvalue - the value to replace with.public float computeFloat(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloat in interface Object2FloatMap<T>computeFloat in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(T key, Object2FloatFunction<T> mappingFunction)
Object2FloatMapcomputeFloatIfAbsent in interface Object2FloatMap<T>computeFloatIfAbsent in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloatIfPresent in interface Object2FloatMap<T>computeFloatIfPresent in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(T key, float value, FloatFloatUnaryOperator mappingFunction)
Object2FloatMapmergeFloat in interface Object2FloatMap<T>mergeFloat in class AbstractObject2FloatMap<T>key - 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(Object2FloatMap<T> m, FloatFloatUnaryOperator mappingFunction)
Object2FloatMapmergeAllFloat in interface Object2FloatMap<T>mergeAllFloat in class AbstractObject2FloatMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
public void clear()
public java.util.Comparator<T> comparator()
comparator in interface java.util.SortedMap<T,java.lang.Float>comparator in interface Object2FloatSortedMap<T>public Object2FloatSortedMap<T> subMap(T fromKey, T toKey)
subMap in interface java.util.SortedMap<T,java.lang.Float>subMap in interface Object2FloatSortedMap<T>public Object2FloatSortedMap<T> headMap(T toKey)
headMap in interface java.util.SortedMap<T,java.lang.Float>headMap in interface Object2FloatSortedMap<T>public Object2FloatSortedMap<T> tailMap(T fromKey)
tailMap in interface java.util.SortedMap<T,java.lang.Float>tailMap in interface Object2FloatSortedMap<T>