public class Char2FloatRBTreeMap extends AbstractChar2FloatMap implements Char2FloatNavigableMap
AbstractChar2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2FloatSortedMap.FastSortedSetChar2FloatMap.BuilderCache, Char2FloatMap.Entry, Char2FloatMap.FastEntrySet, Char2FloatMap.MapBuilder| Constructor and Description |
|---|
Char2FloatRBTreeMap()
Default Constructor
|
Char2FloatRBTreeMap(char[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Char2FloatRBTreeMap(char[] keys,
float[] values,
CharComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Char2FloatRBTreeMap(Char2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2FloatRBTreeMap(Char2FloatMap map,
CharComparator 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.
|
Char2FloatRBTreeMap(java.lang.Character[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2FloatRBTreeMap(java.lang.Character[] keys,
java.lang.Float[] values,
CharComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Char2FloatRBTreeMap(CharComparator comp)
Constructor that allows to define the sorter
|
Char2FloatRBTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Char2FloatRBTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> map,
CharComparator 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(char key,
float value)
A Helper method to add a primitives together.
|
Char2FloatMap.Entry |
ceilingEntry(char key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
char |
ceilingKey(char e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
ObjectSet<Char2FloatMap.Entry> |
char2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
CharComparator |
comparator() |
float |
computeFloat(char key,
CharFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(char key,
Char2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(char key,
CharFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
Char2FloatRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
CharNavigableSet |
descendingKeySet() |
Char2FloatNavigableMap |
descendingMap() |
char |
firstCharKey()
A method to get the first Key of a Map.
|
Char2FloatMap.Entry |
firstEntry() |
float |
firstFloatValue()
A method to get the first Value of a Map.
|
Char2FloatMap.Entry |
floorEntry(char key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
char |
floorKey(char e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(CharFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
char |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
float |
getOrDefault(char key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Char2FloatNavigableMap |
headMap(char toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Char2FloatMap.Entry |
higherEntry(char key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
char |
higherKey(char e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
CharNavigableSet |
keySet() |
char |
lastCharKey()
A method to get the last Key of a Map.
|
Char2FloatMap.Entry |
lastEntry() |
float |
lastFloatValue()
A method to get the last Value of a Map.
|
Char2FloatMap.Entry |
lowerEntry(char key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
char |
lowerKey(char e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllFloat(Char2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(char key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
CharNavigableSet |
navigableKeySet() |
char |
pollFirstCharKey()
A method to get and remove the first Key of a Map.
|
Char2FloatMap.Entry |
pollFirstEntry() |
char |
pollLastCharKey()
A method to get and remove the last Key of a Map.
|
Char2FloatMap.Entry |
pollLastEntry() |
float |
put(char key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(char key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(char key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(char key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(char value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(char value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
float |
subFrom(char key,
float value)
A Helper method to subtract from primitive from each other.
|
Char2FloatNavigableMap |
subMap(char fromKey,
boolean fromInclusive,
char toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
float |
supplyFloatIfAbsent(char key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Char2FloatNavigableMap |
tailMap(char 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 Char2FloatRBTreeMap()
public Char2FloatRBTreeMap(CharComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Char2FloatRBTreeMap(java.lang.Character[] 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 Char2FloatRBTreeMap(java.lang.Character[] keys,
java.lang.Float[] values,
CharComparator 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 Char2FloatRBTreeMap(char[] 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 Char2FloatRBTreeMap(char[] keys,
float[] values,
CharComparator 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 Char2FloatRBTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Char2FloatRBTreeMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> map,
CharComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Char2FloatRBTreeMap(Char2FloatMap map)
map - the values that should be present in the mappublic Char2FloatRBTreeMap(Char2FloatMap map, CharComparator 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(char value)
Char2FloatNavigableMapsetDefaultMaxValue in interface Char2FloatNavigableMapvalue - the new max valuepublic char getDefaultMaxValue()
Char2FloatNavigableMapgetDefaultMaxValue in interface Char2FloatNavigableMappublic void setDefaultMinValue(char value)
Char2FloatNavigableMapsetDefaultMinValue in interface Char2FloatNavigableMapvalue - the new min valuepublic char getDefaultMinValue()
Char2FloatNavigableMapgetDefaultMinValue in interface Char2FloatNavigableMappublic float put(char key,
float value)
Char2FloatMapput in interface Char2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(char key,
float value)
Char2FloatMapputIfAbsent in interface Char2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(char key,
float value)
Char2FloatMapaddTo in interface Char2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(char key,
float value)
Char2FloatMapChar2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Char2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic CharComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Character,java.lang.Float>comparator in interface Char2FloatSortedMappublic boolean containsKey(char key)
Char2FloatMapcontainsKey in interface Char2FloatMapcontainsKey in class AbstractChar2FloatMapkey - element that is searched forpublic float get(char key)
Char2FloatMapget in interface Char2FloatMapkey - the key that is searched forpublic float getOrDefault(char key,
float defaultValue)
Char2FloatMapgetOrDefault in interface Char2FloatMapgetOrDefault in class AbstractChar2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char firstCharKey()
Char2FloatSortedMapfirstCharKey in interface Char2FloatSortedMappublic char pollFirstCharKey()
Char2FloatSortedMappollFirstCharKey in interface Char2FloatSortedMappublic char lastCharKey()
Char2FloatSortedMaplastCharKey in interface Char2FloatSortedMappublic char pollLastCharKey()
Char2FloatSortedMappollLastCharKey in interface Char2FloatSortedMappublic Char2FloatMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>firstEntry in interface Char2FloatNavigableMappublic Char2FloatMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>lastEntry in interface Char2FloatNavigableMappublic Char2FloatMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>pollFirstEntry in interface Char2FloatNavigableMappublic Char2FloatMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>pollLastEntry in interface Char2FloatNavigableMappublic float firstFloatValue()
Char2FloatSortedMapfirstFloatValue in interface Char2FloatSortedMappublic float lastFloatValue()
Char2FloatSortedMaplastFloatValue in interface Char2FloatSortedMappublic float remove(char key)
Char2FloatMapremove in interface Char2FloatMapkey - the element that should be removedpublic float removeOrDefault(char key,
float defaultValue)
Char2FloatMapremoveOrDefault in interface Char2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(char key,
float value)
Char2FloatMapremove in interface Char2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(char key,
float oldValue,
float newValue)
Char2FloatMapreplace in interface Char2FloatMapreplace in class AbstractChar2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(char key,
float value)
Char2FloatMapreplace in interface Char2FloatMapreplace in class AbstractChar2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(char key,
CharFloatUnaryOperator mappingFunction)
Char2FloatMapcomputeFloat in interface Char2FloatMapcomputeFloat in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(char key,
Char2FloatFunction mappingFunction)
Char2FloatMapcomputeFloatIfAbsent in interface Char2FloatMapcomputeFloatIfAbsent in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(char key,
FloatSupplier valueProvider)
Char2FloatMapsupplyFloatIfAbsent in interface Char2FloatMapsupplyFloatIfAbsent in class AbstractChar2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(char key,
CharFloatUnaryOperator mappingFunction)
Char2FloatMapcomputeFloatIfPresent in interface Char2FloatMapcomputeFloatIfPresent in class AbstractChar2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(char key,
float value,
FloatFloatUnaryOperator mappingFunction)
Char2FloatMapmergeFloat in interface Char2FloatMapmergeFloat in class AbstractChar2FloatMapkey - 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(Char2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Char2FloatMapmergeAllFloat in interface Char2FloatMapmergeAllFloat in class AbstractChar2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(CharFloatConsumer action)
Char2FloatMapforEach in interface Char2FloatMapforEach in class AbstractChar2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Character,java.lang.Float>size in class java.util.AbstractMap<java.lang.Character,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Character,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Character,java.lang.Float>public Char2FloatRBTreeMap copy()
Char2FloatMapcopy in interface Char2FloatMapcopy in interface Char2FloatNavigableMapcopy in interface Char2FloatSortedMapcopy in class AbstractChar2FloatMappublic CharNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Character,java.lang.Float>keySet in interface Char2FloatMapkeySet in interface Char2FloatNavigableMapkeySet in interface Char2FloatSortedMapkeySet in class AbstractChar2FloatMappublic ObjectSet<Char2FloatMap.Entry> char2FloatEntrySet()
Char2FloatMapchar2FloatEntrySet in interface Char2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Float>values in interface java.util.SortedMap<java.lang.Character,java.lang.Float>values in interface Char2FloatMapvalues in interface Char2FloatSortedMapvalues in class AbstractChar2FloatMappublic CharNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>navigableKeySet in interface Char2FloatNavigableMappublic Char2FloatNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>descendingMap in interface Char2FloatNavigableMappublic CharNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Character,java.lang.Float>descendingKeySet in interface Char2FloatNavigableMappublic Char2FloatNavigableMap subMap(char fromKey, boolean fromInclusive, char toKey, boolean toInclusive)
Char2FloatNavigableMapsubMap in interface Char2FloatNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Char2FloatNavigableMap headMap(char toKey, boolean inclusive)
Char2FloatNavigableMapheadMap in interface Char2FloatNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Char2FloatNavigableMap tailMap(char fromKey, boolean inclusive)
Char2FloatNavigableMaptailMap in interface Char2FloatNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic char lowerKey(char e)
Char2FloatNavigableMaplowerKey in interface Char2FloatNavigableMape - that should be compared with.public char floorKey(char e)
Char2FloatNavigableMapfloorKey in interface Char2FloatNavigableMape - that should be compared with.public char higherKey(char e)
Char2FloatNavigableMaphigherKey in interface Char2FloatNavigableMape - that should be compared with.public char ceilingKey(char e)
Char2FloatNavigableMapceilingKey in interface Char2FloatNavigableMape - that should be compared with.public Char2FloatMap.Entry lowerEntry(char key)
Char2FloatNavigableMaplowerEntry in interface Char2FloatNavigableMapkey - that should be compared with.public Char2FloatMap.Entry higherEntry(char key)
Char2FloatNavigableMaphigherEntry in interface Char2FloatNavigableMapkey - that should be compared with.public Char2FloatMap.Entry floorEntry(char key)
Char2FloatNavigableMapfloorEntry in interface Char2FloatNavigableMapkey - that should be compared with.public Char2FloatMap.Entry ceilingEntry(char key)
Char2FloatNavigableMapceilingEntry in interface Char2FloatNavigableMapkey - that should be compared with.