public class Int2FloatAVLTreeMap extends AbstractInt2FloatMap implements Int2FloatNavigableMap
AbstractInt2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2FloatSortedMap.FastSortedSetInt2FloatMap.BuilderCache, Int2FloatMap.Entry, Int2FloatMap.FastEntrySet, Int2FloatMap.MapBuilder| Constructor and Description |
|---|
Int2FloatAVLTreeMap()
Default Constructor
|
Int2FloatAVLTreeMap(int[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Int2FloatAVLTreeMap(int[] keys,
float[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Int2FloatAVLTreeMap(Int2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2FloatAVLTreeMap(Int2FloatMap map,
IntComparator 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.
|
Int2FloatAVLTreeMap(IntComparator comp)
Constructor that allows to define the sorter
|
Int2FloatAVLTreeMap(java.lang.Integer[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2FloatAVLTreeMap(java.lang.Integer[] keys,
java.lang.Float[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Int2FloatAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2FloatAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Float> map,
IntComparator 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 |
|---|---|
float |
addTo(int key,
float value)
A Helper method to add a primitives together.
|
Int2FloatMap.Entry |
ceilingEntry(int key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
int |
ceilingKey(int e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
IntComparator |
comparator() |
float |
computeFloat(int key,
IntFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(int key,
Int2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(int key,
IntFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
Int2FloatAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
IntNavigableSet |
descendingKeySet() |
Int2FloatNavigableMap |
descendingMap() |
Int2FloatMap.Entry |
firstEntry() |
float |
firstFloatValue()
A method to get the first Value of a Map.
|
int |
firstIntKey()
A method to get the first Key of a Map.
|
Int2FloatMap.Entry |
floorEntry(int key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
int |
floorKey(int e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(IntFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
int |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
float |
getOrDefault(int key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Int2FloatNavigableMap |
headMap(int toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Int2FloatMap.Entry |
higherEntry(int key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
int |
higherKey(int e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ObjectSet<Int2FloatMap.Entry> |
int2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntNavigableSet |
keySet() |
Int2FloatMap.Entry |
lastEntry() |
float |
lastFloatValue()
A method to get the last Value of a Map.
|
int |
lastIntKey()
A method to get the last Key of a Map.
|
Int2FloatMap.Entry |
lowerEntry(int key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
int |
lowerKey(int e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllFloat(Int2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(int key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
IntNavigableSet |
navigableKeySet() |
Int2FloatMap.Entry |
pollFirstEntry() |
int |
pollFirstIntKey()
A method to get and remove the first Key of a Map.
|
Int2FloatMap.Entry |
pollLastEntry() |
int |
pollLastIntKey()
A method to get and remove the last Key of a Map.
|
float |
put(int key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(int key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(int key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(int key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(int value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(int value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
float |
subFrom(int key,
float value)
A Helper method to subtract from primitive from each other.
|
Int2FloatNavigableMap |
subMap(int fromKey,
boolean fromInclusive,
int toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
float |
supplyFloatIfAbsent(int key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Int2FloatNavigableMap |
tailMap(int fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
FloatCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceFloats, replaceFloats, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, applyAsFloat, 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, replaceFloats, replaceFloats, setDefaultReturnValuepublic Int2FloatAVLTreeMap()
public Int2FloatAVLTreeMap(IntComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Int2FloatAVLTreeMap(java.lang.Integer[] 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 Int2FloatAVLTreeMap(java.lang.Integer[] keys,
java.lang.Float[] values,
IntComparator 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 Int2FloatAVLTreeMap(int[] 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 Int2FloatAVLTreeMap(int[] keys,
float[] values,
IntComparator 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 Int2FloatAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Int2FloatAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Float> map,
IntComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Int2FloatAVLTreeMap(Int2FloatMap map)
map - the values that should be present in the mappublic Int2FloatAVLTreeMap(Int2FloatMap map, IntComparator 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(int value)
Int2FloatNavigableMapsetDefaultMaxValue in interface Int2FloatNavigableMapvalue - the new max valuepublic int getDefaultMaxValue()
Int2FloatNavigableMapgetDefaultMaxValue in interface Int2FloatNavigableMappublic void setDefaultMinValue(int value)
Int2FloatNavigableMapsetDefaultMinValue in interface Int2FloatNavigableMapvalue - the new min valuepublic int getDefaultMinValue()
Int2FloatNavigableMapgetDefaultMinValue in interface Int2FloatNavigableMappublic float put(int key,
float value)
Int2FloatMapput in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(int key,
float value)
Int2FloatMapputIfAbsent in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(int key,
float value)
Int2FloatMapaddTo in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(int key,
float value)
Int2FloatMapInt2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic IntComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Integer,java.lang.Float>comparator in interface Int2FloatSortedMappublic boolean containsKey(int key)
Int2FloatMapcontainsKey in interface Int2FloatMapcontainsKey in class AbstractInt2FloatMapkey - element that is searched forpublic float get(int key)
Int2FloatMapget in interface Int2FloatMapkey - the key that is searched forpublic float getOrDefault(int key,
float defaultValue)
Int2FloatMapgetOrDefault in interface Int2FloatMapgetOrDefault in class AbstractInt2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int firstIntKey()
Int2FloatSortedMapfirstIntKey in interface Int2FloatSortedMappublic int pollFirstIntKey()
Int2FloatSortedMappollFirstIntKey in interface Int2FloatSortedMappublic int lastIntKey()
Int2FloatSortedMaplastIntKey in interface Int2FloatSortedMappublic int pollLastIntKey()
Int2FloatSortedMappollLastIntKey in interface Int2FloatSortedMappublic Int2FloatMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>firstEntry in interface Int2FloatNavigableMappublic Int2FloatMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>lastEntry in interface Int2FloatNavigableMappublic Int2FloatMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>pollFirstEntry in interface Int2FloatNavigableMappublic Int2FloatMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>pollLastEntry in interface Int2FloatNavigableMappublic float firstFloatValue()
Int2FloatSortedMapfirstFloatValue in interface Int2FloatSortedMappublic float lastFloatValue()
Int2FloatSortedMaplastFloatValue in interface Int2FloatSortedMappublic float remove(int key)
Int2FloatMapremove in interface Int2FloatMapkey - the element that should be removedpublic float removeOrDefault(int key,
float defaultValue)
Int2FloatMapremoveOrDefault in interface Int2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
float value)
Int2FloatMapremove in interface Int2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
float oldValue,
float newValue)
Int2FloatMapreplace in interface Int2FloatMapreplace in class AbstractInt2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(int key,
float value)
Int2FloatMapreplace in interface Int2FloatMapreplace in class AbstractInt2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(int key,
IntFloatUnaryOperator mappingFunction)
Int2FloatMapcomputeFloat in interface Int2FloatMapcomputeFloat in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(int key,
Int2FloatFunction mappingFunction)
Int2FloatMapcomputeFloatIfAbsent in interface Int2FloatMapcomputeFloatIfAbsent in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(int key,
FloatSupplier valueProvider)
Int2FloatMapsupplyFloatIfAbsent in interface Int2FloatMapsupplyFloatIfAbsent in class AbstractInt2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(int key,
IntFloatUnaryOperator mappingFunction)
Int2FloatMapcomputeFloatIfPresent in interface Int2FloatMapcomputeFloatIfPresent in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(int key,
float value,
FloatFloatUnaryOperator mappingFunction)
Int2FloatMapmergeFloat in interface Int2FloatMapmergeFloat in class AbstractInt2FloatMapkey - 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(Int2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Int2FloatMapmergeAllFloat in interface Int2FloatMapmergeAllFloat in class AbstractInt2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(IntFloatConsumer action)
Int2FloatMapforEach in interface Int2FloatMapforEach in class AbstractInt2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Float>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>public Int2FloatAVLTreeMap copy()
Int2FloatMapcopy in interface Int2FloatMapcopy in interface Int2FloatNavigableMapcopy in interface Int2FloatSortedMapcopy in class AbstractInt2FloatMappublic IntNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Integer,java.lang.Float>keySet in interface Int2FloatMapkeySet in interface Int2FloatNavigableMapkeySet in interface Int2FloatSortedMapkeySet in class AbstractInt2FloatMappublic ObjectSet<Int2FloatMap.Entry> int2FloatEntrySet()
Int2FloatMapint2FloatEntrySet in interface Int2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Float>values in interface java.util.SortedMap<java.lang.Integer,java.lang.Float>values in interface Int2FloatMapvalues in interface Int2FloatSortedMapvalues in class AbstractInt2FloatMappublic IntNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>navigableKeySet in interface Int2FloatNavigableMappublic Int2FloatNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>descendingMap in interface Int2FloatNavigableMappublic IntNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Float>descendingKeySet in interface Int2FloatNavigableMappublic Int2FloatNavigableMap subMap(int fromKey, boolean fromInclusive, int toKey, boolean toInclusive)
Int2FloatNavigableMapsubMap in interface Int2FloatNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Int2FloatNavigableMap headMap(int toKey, boolean inclusive)
Int2FloatNavigableMapheadMap in interface Int2FloatNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Int2FloatNavigableMap tailMap(int fromKey, boolean inclusive)
Int2FloatNavigableMaptailMap in interface Int2FloatNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic int lowerKey(int e)
Int2FloatNavigableMaplowerKey in interface Int2FloatNavigableMape - that should be compared with.public int floorKey(int e)
Int2FloatNavigableMapfloorKey in interface Int2FloatNavigableMape - that should be compared with.public int higherKey(int e)
Int2FloatNavigableMaphigherKey in interface Int2FloatNavigableMape - that should be compared with.public int ceilingKey(int e)
Int2FloatNavigableMapceilingKey in interface Int2FloatNavigableMape - that should be compared with.public Int2FloatMap.Entry lowerEntry(int key)
Int2FloatNavigableMaplowerEntry in interface Int2FloatNavigableMapkey - that should be compared with.public Int2FloatMap.Entry higherEntry(int key)
Int2FloatNavigableMaphigherEntry in interface Int2FloatNavigableMapkey - that should be compared with.public Int2FloatMap.Entry floorEntry(int key)
Int2FloatNavigableMapfloorEntry in interface Int2FloatNavigableMapkey - that should be compared with.public Int2FloatMap.Entry ceilingEntry(int key)
Int2FloatNavigableMapceilingEntry in interface Int2FloatNavigableMapkey - that should be compared with.