T - the type of elements maintained by this Collectionpublic class Object2FloatAVLTreeMap<T> extends AbstractObject2FloatMap<T> implements Object2FloatNavigableMap<T>
AbstractObject2FloatMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2FloatSortedMap.FastSortedSet<T>Object2FloatMap.FastEntrySet<T>| Constructor and Description |
|---|
Object2FloatAVLTreeMap()
Default Constructor
|
Object2FloatAVLTreeMap(java.util.Comparator<T> comp)
Constructor that allows to define the sorter
|
Object2FloatAVLTreeMap(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.
|
Object2FloatAVLTreeMap(java.util.Map<? extends T,? extends java.lang.Float> map,
java.util.Comparator<T> comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
Object2FloatAVLTreeMap(Object2FloatMap<T> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2FloatAVLTreeMap(Object2FloatMap<T> map,
java.util.Comparator<T> comp)
A Type Specific Helper function that has a custom sorter and allows to create a new Map with exactly the same values as the provided map.
|
Object2FloatAVLTreeMap(T[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2FloatAVLTreeMap(T[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2FloatAVLTreeMap(T[] keys,
float[] values,
java.util.Comparator<T> comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Object2FloatAVLTreeMap(T[] keys,
java.lang.Float[] values,
java.util.Comparator<T> comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(T key,
float value)
A Helper method to add a primitives together.
|
Object2FloatMap.Entry<T> |
ceilingEntry(T key) |
T |
ceilingKey(T e) |
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) |
ObjectNavigableSet<T> |
descendingKeySet() |
Object2FloatNavigableMap<T> |
descendingMap() |
Object2FloatMap.Entry<T> |
firstEntry() |
float |
firstFloatValue()
A method to get the first Value of a Map.
|
T |
firstKey() |
Object2FloatMap.Entry<T> |
floorEntry(T key) |
T |
floorKey(T e) |
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.
|
T |
getDefaultMaxValue()
only used for primitives
|
T |
getDefaultMinValue()
only used for primitives
|
float |
getFloat(T key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(T key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Object2FloatNavigableMap<T> |
headMap(T toKey,
boolean inclusive) |
Object2FloatMap.Entry<T> |
higherEntry(T key) |
T |
higherKey(T e) |
ObjectSortedSet<T> |
keySet() |
Object2FloatMap.Entry<T> |
lastEntry() |
float |
lastFloatValue()
A method to get the last Value of a Map.
|
T |
lastKey() |
Object2FloatMap.Entry<T> |
lowerEntry(T key) |
T |
lowerKey(T e) |
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.
|
ObjectNavigableSet<T> |
navigableKeySet() |
ObjectSet<Object2FloatMap.Entry<T>> |
object2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Object2FloatMap.Entry<T> |
pollFirstEntry() |
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
Object2FloatMap.Entry<T> |
pollLastEntry() |
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.
|
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() |
Object2FloatNavigableMap<T> |
subMap(T fromKey,
boolean fromInclusive,
T toKey,
boolean toInclusive) |
Object2FloatNavigableMap<T> |
tailMap(T fromKey,
boolean inclusive) |
FloatCollection |
values() |
addToAll, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceFloats, replaceFloats, setDefaultReturnValueheadMap, subMap, tailMapaddToAll, compute, computeIfAbsent, computeIfPresent, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceFloats, replaceFloats, setDefaultReturnValuepublic Object2FloatAVLTreeMap()
public Object2FloatAVLTreeMap(java.util.Comparator<T> comp)
comp - the function that decides how the tree is sorted, can be nullpublic Object2FloatAVLTreeMap(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 lenghtpublic Object2FloatAVLTreeMap(T[] keys, java.lang.Float[] values, java.util.Comparator<T> comp)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.comp - the function that decides how the tree is sorted, can be nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Object2FloatAVLTreeMap(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 Object2FloatAVLTreeMap(T[] keys, float[] values, java.util.Comparator<T> comp)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.comp - the function that decides how the tree is sorted, can be nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Object2FloatAVLTreeMap(java.util.Map<? extends T,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Object2FloatAVLTreeMap(java.util.Map<? extends T,? extends java.lang.Float> map, java.util.Comparator<T> comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Object2FloatAVLTreeMap(Object2FloatMap<T> map)
map - the values that should be present in the mappublic Object2FloatAVLTreeMap(Object2FloatMap<T> map, java.util.Comparator<T> comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic T getDefaultMaxValue()
public T getDefaultMinValue()
public 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 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 java.util.Comparator<T> comparator()
comparator in interface java.util.SortedMap<T,java.lang.Float>comparator in interface Object2FloatSortedMap<T>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Float>containsKey in class AbstractObject2FloatMap<T>public float getFloat(T key)
Object2FloatMapgetFloat in interface Object2FloatFunction<T>getFloat in interface Object2FloatMap<T>key - the key that is searched forpublic float getOrDefault(T 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 T firstKey()
firstKey in interface java.util.SortedMap<T,java.lang.Float>public T pollFirstKey()
Object2FloatSortedMappollFirstKey in interface Object2FloatSortedMap<T>public T lastKey()
lastKey in interface java.util.SortedMap<T,java.lang.Float>public T pollLastKey()
Object2FloatSortedMappollLastKey in interface Object2FloatSortedMap<T>public Object2FloatMap.Entry<T> firstEntry()
firstEntry in interface java.util.NavigableMap<T,java.lang.Float>firstEntry in interface Object2FloatNavigableMap<T>public Object2FloatMap.Entry<T> lastEntry()
lastEntry in interface java.util.NavigableMap<T,java.lang.Float>lastEntry in interface Object2FloatNavigableMap<T>public Object2FloatMap.Entry<T> pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<T,java.lang.Float>pollFirstEntry in interface Object2FloatNavigableMap<T>public Object2FloatMap.Entry<T> pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<T,java.lang.Float>pollLastEntry in interface Object2FloatNavigableMap<T>public float firstFloatValue()
Object2FloatSortedMapfirstFloatValue in interface Object2FloatSortedMap<T>public float lastFloatValue()
Object2FloatSortedMaplastFloatValue 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 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 ObjectSortedSet<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 ObjectSet<Object2FloatMap.Entry<T>> object2FloatEntrySet()
Object2FloatMapobject2FloatEntrySet in interface Object2FloatMap<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 ObjectNavigableSet<T> navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<T,java.lang.Float>navigableKeySet in interface Object2FloatNavigableMap<T>public Object2FloatNavigableMap<T> descendingMap()
descendingMap in interface java.util.NavigableMap<T,java.lang.Float>descendingMap in interface Object2FloatNavigableMap<T>public ObjectNavigableSet<T> descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<T,java.lang.Float>descendingKeySet in interface Object2FloatNavigableMap<T>public Object2FloatNavigableMap<T> subMap(T fromKey, boolean fromInclusive, T toKey, boolean toInclusive)
subMap in interface java.util.NavigableMap<T,java.lang.Float>subMap in interface Object2FloatNavigableMap<T>public Object2FloatNavigableMap<T> headMap(T toKey, boolean inclusive)
headMap in interface java.util.NavigableMap<T,java.lang.Float>headMap in interface Object2FloatNavigableMap<T>public Object2FloatNavigableMap<T> tailMap(T fromKey, boolean inclusive)
tailMap in interface java.util.NavigableMap<T,java.lang.Float>tailMap in interface Object2FloatNavigableMap<T>public T lowerKey(T e)
lowerKey in interface java.util.NavigableMap<T,java.lang.Float>public T floorKey(T e)
floorKey in interface java.util.NavigableMap<T,java.lang.Float>public T higherKey(T e)
higherKey in interface java.util.NavigableMap<T,java.lang.Float>public T ceilingKey(T e)
ceilingKey in interface java.util.NavigableMap<T,java.lang.Float>public Object2FloatMap.Entry<T> lowerEntry(T key)
lowerEntry in interface java.util.NavigableMap<T,java.lang.Float>lowerEntry in interface Object2FloatNavigableMap<T>public Object2FloatMap.Entry<T> higherEntry(T key)
higherEntry in interface java.util.NavigableMap<T,java.lang.Float>higherEntry in interface Object2FloatNavigableMap<T>public Object2FloatMap.Entry<T> floorEntry(T key)
floorEntry in interface java.util.NavigableMap<T,java.lang.Float>floorEntry in interface Object2FloatNavigableMap<T>public Object2FloatMap.Entry<T> ceilingEntry(T key)
ceilingEntry in interface java.util.NavigableMap<T,java.lang.Float>ceilingEntry in interface Object2FloatNavigableMap<T>