public class Float2IntAVLTreeMap extends AbstractFloat2IntMap implements Float2IntNavigableMap
AbstractFloat2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2IntSortedMap.FastSortedSetFloat2IntMap.BuilderCache, Float2IntMap.Entry, Float2IntMap.FastEntrySet, Float2IntMap.MapBuilder| Constructor and Description |
|---|
Float2IntAVLTreeMap()
Default Constructor
|
Float2IntAVLTreeMap(float[] keys,
int[] values)
Helper constructor that allow to create a map from unboxed values
|
Float2IntAVLTreeMap(float[] keys,
int[] values,
FloatComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Float2IntAVLTreeMap(java.lang.Float[] keys,
java.lang.Integer[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Float2IntAVLTreeMap(java.lang.Float[] keys,
java.lang.Integer[] values,
FloatComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Float2IntAVLTreeMap(Float2IntMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Float2IntAVLTreeMap(Float2IntMap map,
FloatComparator 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.
|
Float2IntAVLTreeMap(FloatComparator comp)
Constructor that allows to define the sorter
|
Float2IntAVLTreeMap(java.util.Map<? extends java.lang.Float,? extends java.lang.Integer> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Float2IntAVLTreeMap(java.util.Map<? extends java.lang.Float,? extends java.lang.Integer> map,
FloatComparator comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addTo(float key,
int value)
A Helper method to add a primitives together.
|
Float2IntMap.Entry |
ceilingEntry(float key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
float |
ceilingKey(float e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
FloatComparator |
comparator() |
int |
computeInt(float key,
FloatIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(float key,
Float2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(float key,
FloatIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(float key)
Type Specific method to reduce boxing/unboxing of values
|
Float2IntAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
FloatNavigableSet |
descendingKeySet() |
Float2IntNavigableMap |
descendingMap() |
Float2IntMap.Entry |
firstEntry() |
float |
firstFloatKey()
A method to get the first Key of a Map.
|
int |
firstIntValue()
A method to get the first Value of a Map.
|
ObjectSet<Float2IntMap.Entry> |
float2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Float2IntMap.Entry |
floorEntry(float key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
float |
floorKey(float e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(FloatIntConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
int |
get(float key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
float |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
int |
getOrDefault(float key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Float2IntNavigableMap |
headMap(float toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Float2IntMap.Entry |
higherEntry(float key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
float |
higherKey(float e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
FloatNavigableSet |
keySet() |
Float2IntMap.Entry |
lastEntry() |
float |
lastFloatKey()
A method to get the last Key of a Map.
|
int |
lastIntValue()
A method to get the last Value of a Map.
|
Float2IntMap.Entry |
lowerEntry(float key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
float |
lowerKey(float e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllInt(Float2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(float key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
FloatNavigableSet |
navigableKeySet() |
Float2IntMap.Entry |
pollFirstEntry() |
float |
pollFirstFloatKey()
A method to get and remove the first Key of a Map.
|
Float2IntMap.Entry |
pollLastEntry() |
float |
pollLastFloatKey()
A method to get and remove the last Key of a Map.
|
int |
put(float key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(float key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(float key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(float key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(float key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
replace(float key,
int value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(float key,
int oldValue,
int newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(float value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(float value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
int |
subFrom(float key,
int value)
A Helper method to subtract from primitive from each other.
|
Float2IntNavigableMap |
subMap(float fromKey,
boolean fromInclusive,
float toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
int |
supplyIntIfAbsent(float key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Float2IntNavigableMap |
tailMap(float fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
IntCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceInts, replaceInts, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, applyAsInt, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceInts, replaceInts, setDefaultReturnValuepublic Float2IntAVLTreeMap()
public Float2IntAVLTreeMap(FloatComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Float2IntAVLTreeMap(java.lang.Float[] keys,
java.lang.Integer[] 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 Float2IntAVLTreeMap(java.lang.Float[] keys,
java.lang.Integer[] values,
FloatComparator 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 Float2IntAVLTreeMap(float[] keys,
int[] 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 Float2IntAVLTreeMap(float[] keys,
int[] values,
FloatComparator 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 Float2IntAVLTreeMap(java.util.Map<? extends java.lang.Float,? extends java.lang.Integer> map)
map - the values that should be present in the mappublic Float2IntAVLTreeMap(java.util.Map<? extends java.lang.Float,? extends java.lang.Integer> map,
FloatComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Float2IntAVLTreeMap(Float2IntMap map)
map - the values that should be present in the mappublic Float2IntAVLTreeMap(Float2IntMap map, FloatComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic void setDefaultMaxValue(float value)
Float2IntNavigableMapsetDefaultMaxValue in interface Float2IntNavigableMapvalue - the new max valuepublic float getDefaultMaxValue()
Float2IntNavigableMapgetDefaultMaxValue in interface Float2IntNavigableMappublic void setDefaultMinValue(float value)
Float2IntNavigableMapsetDefaultMinValue in interface Float2IntNavigableMapvalue - the new min valuepublic float getDefaultMinValue()
Float2IntNavigableMapgetDefaultMinValue in interface Float2IntNavigableMappublic int put(float key,
int value)
Float2IntMapput in interface Float2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(float key,
int value)
Float2IntMapputIfAbsent in interface Float2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(float key,
int value)
Float2IntMapaddTo in interface Float2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(float key,
int value)
Float2IntMapFloat2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Float2IntMapkey - that should be subtract fromvalue - that should be subtractpublic FloatComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Float,java.lang.Integer>comparator in interface Float2IntSortedMappublic boolean containsKey(float key)
Float2IntMapcontainsKey in interface Float2IntMapcontainsKey in class AbstractFloat2IntMapkey - element that is searched forpublic int get(float key)
Float2IntMapget in interface Float2IntMapkey - the key that is searched forpublic int getOrDefault(float key,
int defaultValue)
Float2IntMapgetOrDefault in interface Float2IntMapgetOrDefault in class AbstractFloat2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float firstFloatKey()
Float2IntSortedMapfirstFloatKey in interface Float2IntSortedMappublic float pollFirstFloatKey()
Float2IntSortedMappollFirstFloatKey in interface Float2IntSortedMappublic float lastFloatKey()
Float2IntSortedMaplastFloatKey in interface Float2IntSortedMappublic float pollLastFloatKey()
Float2IntSortedMappollLastFloatKey in interface Float2IntSortedMappublic Float2IntMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>firstEntry in interface Float2IntNavigableMappublic Float2IntMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>lastEntry in interface Float2IntNavigableMappublic Float2IntMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>pollFirstEntry in interface Float2IntNavigableMappublic Float2IntMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>pollLastEntry in interface Float2IntNavigableMappublic int firstIntValue()
Float2IntSortedMapfirstIntValue in interface Float2IntSortedMappublic int lastIntValue()
Float2IntSortedMaplastIntValue in interface Float2IntSortedMappublic int remove(float key)
Float2IntMapremove in interface Float2IntMapkey - the element that should be removedpublic int removeOrDefault(float key,
int defaultValue)
Float2IntMapremoveOrDefault in interface Float2IntMapkey - 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,
int value)
Float2IntMapremove in interface Float2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(float key,
int oldValue,
int newValue)
Float2IntMapreplace in interface Float2IntMapreplace in class AbstractFloat2IntMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public int replace(float key,
int value)
Float2IntMapreplace in interface Float2IntMapreplace in class AbstractFloat2IntMapkey - the element that should be searched forvalue - the value to replace with.public int computeInt(float key,
FloatIntUnaryOperator mappingFunction)
Float2IntMapcomputeInt in interface Float2IntMapcomputeInt in class AbstractFloat2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(float key,
Float2IntFunction mappingFunction)
Float2IntMapcomputeIntIfAbsent in interface Float2IntMapcomputeIntIfAbsent in class AbstractFloat2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int supplyIntIfAbsent(float key,
IntSupplier valueProvider)
Float2IntMapsupplyIntIfAbsent in interface Float2IntMapsupplyIntIfAbsent in class AbstractFloat2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int computeIntIfPresent(float key,
FloatIntUnaryOperator mappingFunction)
Float2IntMapcomputeIntIfPresent in interface Float2IntMapcomputeIntIfPresent in class AbstractFloat2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int mergeInt(float key,
int value,
IntIntUnaryOperator mappingFunction)
Float2IntMapmergeInt in interface Float2IntMapmergeInt in class AbstractFloat2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Float2IntMap m, IntIntUnaryOperator mappingFunction)
Float2IntMapmergeAllInt in interface Float2IntMapmergeAllInt in class AbstractFloat2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(FloatIntConsumer action)
Float2IntMapforEach in interface Float2IntMapforEach in class AbstractFloat2IntMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Float,java.lang.Integer>size in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public void clear()
clear in interface java.util.Map<java.lang.Float,java.lang.Integer>clear in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public Float2IntAVLTreeMap copy()
Float2IntMapcopy in interface Float2IntMapcopy in interface Float2IntNavigableMapcopy in interface Float2IntSortedMapcopy in class AbstractFloat2IntMappublic FloatNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Float,java.lang.Integer>keySet in interface java.util.SortedMap<java.lang.Float,java.lang.Integer>keySet in interface Float2IntMapkeySet in interface Float2IntNavigableMapkeySet in interface Float2IntSortedMapkeySet in class AbstractFloat2IntMappublic ObjectSet<Float2IntMap.Entry> float2IntEntrySet()
Float2IntMapfloat2IntEntrySet in interface Float2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Float,java.lang.Integer>values in interface java.util.SortedMap<java.lang.Float,java.lang.Integer>values in interface Float2IntMapvalues in interface Float2IntSortedMapvalues in class AbstractFloat2IntMappublic FloatNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>navigableKeySet in interface Float2IntNavigableMappublic Float2IntNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>descendingMap in interface Float2IntNavigableMappublic FloatNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Float,java.lang.Integer>descendingKeySet in interface Float2IntNavigableMappublic Float2IntNavigableMap subMap(float fromKey, boolean fromInclusive, float toKey, boolean toInclusive)
Float2IntNavigableMapsubMap in interface Float2IntNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Float2IntNavigableMap headMap(float toKey, boolean inclusive)
Float2IntNavigableMapheadMap in interface Float2IntNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Float2IntNavigableMap tailMap(float fromKey, boolean inclusive)
Float2IntNavigableMaptailMap in interface Float2IntNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic float lowerKey(float e)
Float2IntNavigableMaplowerKey in interface Float2IntNavigableMape - that should be compared with.public float floorKey(float e)
Float2IntNavigableMapfloorKey in interface Float2IntNavigableMape - that should be compared with.public float higherKey(float e)
Float2IntNavigableMaphigherKey in interface Float2IntNavigableMape - that should be compared with.public float ceilingKey(float e)
Float2IntNavigableMapceilingKey in interface Float2IntNavigableMape - that should be compared with.public Float2IntMap.Entry lowerEntry(float key)
Float2IntNavigableMaplowerEntry in interface Float2IntNavigableMapkey - that should be compared with.public Float2IntMap.Entry higherEntry(float key)
Float2IntNavigableMaphigherEntry in interface Float2IntNavigableMapkey - that should be compared with.public Float2IntMap.Entry floorEntry(float key)
Float2IntNavigableMapfloorEntry in interface Float2IntNavigableMapkey - that should be compared with.public Float2IntMap.Entry ceilingEntry(float key)
Float2IntNavigableMapceilingEntry in interface Float2IntNavigableMapkey - that should be compared with.