V - the keyType of elements maintained by this Collectionpublic class Char2ObjectRBTreeMap<V> extends AbstractChar2ObjectMap<V> implements Char2ObjectNavigableMap<V>
AbstractChar2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ObjectSortedMap.FastSortedSet<V>Char2ObjectMap.BuilderCache<V>, Char2ObjectMap.Entry<V>, Char2ObjectMap.FastEntrySet<V>, Char2ObjectMap.MapBuilder| Constructor and Description |
|---|
Char2ObjectRBTreeMap()
Default Constructor
|
Char2ObjectRBTreeMap(char[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Char2ObjectRBTreeMap(char[] keys,
V[] values,
CharComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Char2ObjectRBTreeMap(Char2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2ObjectRBTreeMap(Char2ObjectMap<V> 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.
|
Char2ObjectRBTreeMap(java.lang.Character[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2ObjectRBTreeMap(java.lang.Character[] keys,
V[] values,
CharComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Char2ObjectRBTreeMap(CharComparator comp)
Constructor that allows to define the sorter
|
Char2ObjectRBTreeMap(java.util.Map<? extends java.lang.Character,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Char2ObjectRBTreeMap(java.util.Map<? extends java.lang.Character,? extends V> 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 |
|---|---|
Char2ObjectMap.Entry<V> |
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<Char2ObjectMap.Entry<V>> |
char2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
CharComparator |
comparator() |
V |
compute(char key,
CharObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(char key,
CharFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(char key,
CharObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
Char2ObjectRBTreeMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
CharNavigableSet |
descendingKeySet() |
Char2ObjectNavigableMap<V> |
descendingMap() |
char |
firstCharKey()
A method to get the first Key of a Map.
|
Char2ObjectMap.Entry<V> |
firstEntry() |
V |
firstValue()
A method to get the first Value of a Map.
|
Char2ObjectMap.Entry<V> |
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(CharObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
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.
|
V |
getOrDefault(char key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Char2ObjectNavigableMap<V> |
headMap(char toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Char2ObjectMap.Entry<V> |
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.
|
Char2ObjectMap.Entry<V> |
lastEntry() |
V |
lastValue()
A method to get the last Value of a Map.
|
Char2ObjectMap.Entry<V> |
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.
|
V |
merge(char key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Char2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
CharNavigableSet |
navigableKeySet() |
char |
pollFirstCharKey()
A method to get and remove the first Key of a Map.
|
Char2ObjectMap.Entry<V> |
pollFirstEntry() |
char |
pollLastCharKey()
A method to get and remove the last Key of a Map.
|
Char2ObjectMap.Entry<V> |
pollLastEntry() |
V |
put(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
removeOrDefault(char key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
replace(char key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
V oldValue,
V 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() |
Char2ObjectNavigableMap<V> |
subMap(char fromKey,
boolean fromInclusive,
char toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
V |
supplyIfAbsent(char key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Char2ObjectNavigableMap<V> |
tailMap(char fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
ObjectCollection<V> |
values() |
containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceObjects, replaceObjects, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyapply, builder, compute, computeIfAbsent, computeIfPresent, containsKey, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValuepublic Char2ObjectRBTreeMap()
public Char2ObjectRBTreeMap(CharComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Char2ObjectRBTreeMap(java.lang.Character[] keys,
V[] 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 Char2ObjectRBTreeMap(java.lang.Character[] keys,
V[] 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 Char2ObjectRBTreeMap(char[] keys,
V[] 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 Char2ObjectRBTreeMap(char[] keys,
V[] 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 Char2ObjectRBTreeMap(java.util.Map<? extends java.lang.Character,? extends V> map)
map - the values that should be present in the mappublic Char2ObjectRBTreeMap(java.util.Map<? extends java.lang.Character,? extends V> 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 Char2ObjectRBTreeMap(Char2ObjectMap<V> map)
map - the values that should be present in the mappublic Char2ObjectRBTreeMap(Char2ObjectMap<V> 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)
Char2ObjectNavigableMapsetDefaultMaxValue in interface Char2ObjectNavigableMap<V>value - the new max valuepublic char getDefaultMaxValue()
Char2ObjectNavigableMapgetDefaultMaxValue in interface Char2ObjectNavigableMap<V>public void setDefaultMinValue(char value)
Char2ObjectNavigableMapsetDefaultMinValue in interface Char2ObjectNavigableMap<V>value - the new min valuepublic char getDefaultMinValue()
Char2ObjectNavigableMapgetDefaultMinValue in interface Char2ObjectNavigableMap<V>public V put(char key, V value)
Char2ObjectMapput in interface Char2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(char key, V value)
Char2ObjectMapputIfAbsent in interface Char2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public CharComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Character,V>comparator in interface Char2ObjectSortedMap<V>public boolean containsKey(char key)
Char2ObjectMapcontainsKey in interface Char2ObjectMap<V>containsKey in class AbstractChar2ObjectMap<V>key - element that is searched forpublic V get(char key)
Char2ObjectMapget in interface Char2ObjectMap<V>key - the key that is searched forpublic V getOrDefault(char key, V defaultValue)
Char2ObjectMapgetOrDefault in interface Char2ObjectMap<V>getOrDefault in class AbstractChar2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char firstCharKey()
Char2ObjectSortedMapfirstCharKey in interface Char2ObjectSortedMap<V>public char pollFirstCharKey()
Char2ObjectSortedMappollFirstCharKey in interface Char2ObjectSortedMap<V>public char lastCharKey()
Char2ObjectSortedMaplastCharKey in interface Char2ObjectSortedMap<V>public char pollLastCharKey()
Char2ObjectSortedMappollLastCharKey in interface Char2ObjectSortedMap<V>public Char2ObjectMap.Entry<V> firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Character,V>firstEntry in interface Char2ObjectNavigableMap<V>public Char2ObjectMap.Entry<V> lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Character,V>lastEntry in interface Char2ObjectNavigableMap<V>public Char2ObjectMap.Entry<V> pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Character,V>pollFirstEntry in interface Char2ObjectNavigableMap<V>public Char2ObjectMap.Entry<V> pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Character,V>pollLastEntry in interface Char2ObjectNavigableMap<V>public V firstValue()
Char2ObjectSortedMapfirstValue in interface Char2ObjectSortedMap<V>public V lastValue()
Char2ObjectSortedMaplastValue in interface Char2ObjectSortedMap<V>public V remove(char key)
Char2ObjectMapremove in interface Char2ObjectMap<V>key - the element that should be removedpublic V removeOrDefault(char key, V defaultValue)
Char2ObjectMapremoveOrDefault in interface Char2ObjectMap<V>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(char key,
V value)
Char2ObjectMapremove in interface Char2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(char key,
V oldValue,
V newValue)
Char2ObjectMapreplace in interface Char2ObjectMap<V>replace in class AbstractChar2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(char key, V value)
Char2ObjectMapreplace in interface Char2ObjectMap<V>replace in class AbstractChar2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public V compute(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcompute in interface Char2ObjectMap<V>compute in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(char key, CharFunction<V> mappingFunction)
Char2ObjectMapcomputeIfAbsent in interface Char2ObjectMap<V>computeIfAbsent in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(char key, ObjectSupplier<V> valueProvider)
Char2ObjectMapsupplyIfAbsent in interface Char2ObjectMap<V>supplyIfAbsent in class AbstractChar2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcomputeIfPresent in interface Char2ObjectMap<V>computeIfPresent in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(char key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmerge in interface Char2ObjectMap<V>merge in class AbstractChar2ObjectMap<V>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 mergeAll(Char2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmergeAll in interface Char2ObjectMap<V>mergeAll in class AbstractChar2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(CharObjectConsumer<V> action)
Char2ObjectMapforEach in interface Char2ObjectMap<V>forEach in class AbstractChar2ObjectMap<V>action - processor of the values that are iterator overpublic int size()
public void clear()
public Char2ObjectRBTreeMap<V> copy()
Char2ObjectMapcopy in interface Char2ObjectMap<V>copy in interface Char2ObjectNavigableMap<V>copy in interface Char2ObjectSortedMap<V>copy in class AbstractChar2ObjectMap<V>public CharNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Character,V>keySet in interface java.util.SortedMap<java.lang.Character,V>keySet in interface Char2ObjectMap<V>keySet in interface Char2ObjectNavigableMap<V>keySet in interface Char2ObjectSortedMap<V>keySet in class AbstractChar2ObjectMap<V>public ObjectSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet()
Char2ObjectMapchar2ObjectEntrySet in interface Char2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Character,V>values in interface java.util.SortedMap<java.lang.Character,V>values in interface Char2ObjectMap<V>values in interface Char2ObjectSortedMap<V>values in class AbstractChar2ObjectMap<V>public CharNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Character,V>navigableKeySet in interface Char2ObjectNavigableMap<V>public Char2ObjectNavigableMap<V> descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Character,V>descendingMap in interface Char2ObjectNavigableMap<V>public CharNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Character,V>descendingKeySet in interface Char2ObjectNavigableMap<V>public Char2ObjectNavigableMap<V> subMap(char fromKey, boolean fromInclusive, char toKey, boolean toInclusive)
Char2ObjectNavigableMapsubMap in interface Char2ObjectNavigableMap<V>fromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Char2ObjectNavigableMap<V> headMap(char toKey, boolean inclusive)
Char2ObjectNavigableMapheadMap in interface Char2ObjectNavigableMap<V>toKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Char2ObjectNavigableMap<V> tailMap(char fromKey, boolean inclusive)
Char2ObjectNavigableMaptailMap in interface Char2ObjectNavigableMap<V>fromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic char lowerKey(char e)
Char2ObjectNavigableMaplowerKey in interface Char2ObjectNavigableMap<V>e - that should be compared with.public char floorKey(char e)
Char2ObjectNavigableMapfloorKey in interface Char2ObjectNavigableMap<V>e - that should be compared with.public char higherKey(char e)
Char2ObjectNavigableMaphigherKey in interface Char2ObjectNavigableMap<V>e - that should be compared with.public char ceilingKey(char e)
Char2ObjectNavigableMapceilingKey in interface Char2ObjectNavigableMap<V>e - that should be compared with.public Char2ObjectMap.Entry<V> lowerEntry(char key)
Char2ObjectNavigableMaplowerEntry in interface Char2ObjectNavigableMap<V>key - that should be compared with.public Char2ObjectMap.Entry<V> higherEntry(char key)
Char2ObjectNavigableMaphigherEntry in interface Char2ObjectNavigableMap<V>key - that should be compared with.public Char2ObjectMap.Entry<V> floorEntry(char key)
Char2ObjectNavigableMapfloorEntry in interface Char2ObjectNavigableMap<V>key - that should be compared with.public Char2ObjectMap.Entry<V> ceilingEntry(char key)
Char2ObjectNavigableMapceilingEntry in interface Char2ObjectNavigableMap<V>key - that should be compared with.