T - the keyType of elements maintained by this Collectionpublic class Object2CharRBTreeMap<T> extends AbstractObject2CharMap<T> implements Object2CharNavigableMap<T>
AbstractObject2CharMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2CharSortedMap.FastSortedSet<T>Object2CharMap.BuilderCache<T>, Object2CharMap.Entry<T>, Object2CharMap.FastEntrySet<T>, Object2CharMap.MapBuilder| Constructor and Description |
|---|
Object2CharRBTreeMap()
Default Constructor
|
Object2CharRBTreeMap(java.util.Comparator<T> comp)
Constructor that allows to define the sorter
|
Object2CharRBTreeMap(java.util.Map<? extends T,? extends java.lang.Character> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2CharRBTreeMap(java.util.Map<? extends T,? extends java.lang.Character> 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.
|
Object2CharRBTreeMap(Object2CharMap<T> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2CharRBTreeMap(Object2CharMap<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.
|
Object2CharRBTreeMap(T[] keys,
char[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2CharRBTreeMap(T[] keys,
char[] values,
java.util.Comparator<T> comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Object2CharRBTreeMap(T[] keys,
java.lang.Character[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2CharRBTreeMap(T[] keys,
java.lang.Character[] 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 |
|---|---|
char |
addTo(T key,
char value)
A Helper method to add a primitives together.
|
Object2CharMap.Entry<T> |
ceilingEntry(T key) |
T |
ceilingKey(T e) |
void |
clear() |
java.util.Comparator<T> |
comparator() |
char |
computeChar(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(T key,
ToCharFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key) |
Object2CharRBTreeMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectNavigableSet<T> |
descendingKeySet() |
Object2CharNavigableMap<T> |
descendingMap() |
char |
firstCharValue()
A method to get the first Value of a Map.
|
Object2CharMap.Entry<T> |
firstEntry() |
T |
firstKey() |
Object2CharMap.Entry<T> |
floorEntry(T key) |
T |
floorKey(T e) |
void |
forEach(ObjectCharConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
char |
getChar(T key)
A Type Specific get method to reduce boxing/unboxing
|
T |
getDefaultMaxValue()
only used for primitives
|
T |
getDefaultMinValue()
only used for primitives
|
char |
getOrDefault(T key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Object2CharNavigableMap<T> |
headMap(T toKey,
boolean inclusive) |
Object2CharMap.Entry<T> |
higherEntry(T key) |
T |
higherKey(T e) |
ObjectNavigableSet<T> |
keySet() |
char |
lastCharValue()
A method to get the last Value of a Map.
|
Object2CharMap.Entry<T> |
lastEntry() |
T |
lastKey() |
Object2CharMap.Entry<T> |
lowerEntry(T key) |
T |
lowerKey(T e) |
void |
mergeAllChar(Object2CharMap<T> m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(T key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectNavigableSet<T> |
navigableKeySet() |
ObjectSet<Object2CharMap.Entry<T>> |
object2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Object2CharMap.Entry<T> |
pollFirstEntry() |
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
Object2CharMap.Entry<T> |
pollLastEntry() |
T |
pollLastKey()
A method to get and remove the last Key of a Map.
|
char |
put(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
char |
remOrDefault(T key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
replace(T key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
char |
subFrom(T key,
char value)
A Helper method to subtract from primitive from each other.
|
Object2CharNavigableMap<T> |
subMap(T fromKey,
boolean fromInclusive,
T toKey,
boolean toInclusive) |
char |
supplyCharIfAbsent(T key,
CharSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Object2CharNavigableMap<T> |
tailMap(T fromKey,
boolean inclusive) |
CharCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceChars, replaceChars, setDefaultReturnValueheadMap, subMap, synchronize, synchronize, tailMap, unmodifiableaddToAll, applyAsChar, builder, compute, computeIfAbsent, computeIfPresent, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceChars, replaceChars, setDefaultReturnValuepublic Object2CharRBTreeMap()
public Object2CharRBTreeMap(java.util.Comparator<T> comp)
comp - the function that decides how the tree is sorted, can be nullpublic Object2CharRBTreeMap(T[] keys, java.lang.Character[] 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 Object2CharRBTreeMap(T[] keys, java.lang.Character[] 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 Object2CharRBTreeMap(T[] keys, char[] 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 Object2CharRBTreeMap(T[] keys, char[] 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 Object2CharRBTreeMap(java.util.Map<? extends T,? extends java.lang.Character> map)
map - the values that should be present in the mappublic Object2CharRBTreeMap(java.util.Map<? extends T,? extends java.lang.Character> 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 Object2CharRBTreeMap(Object2CharMap<T> map)
map - the values that should be present in the mappublic Object2CharRBTreeMap(Object2CharMap<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 char put(T key, char value)
Object2CharMapput in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(T key, char value)
Object2CharMapputIfAbsent in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(T key, char value)
Object2CharMapaddTo in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(T key, char value)
Object2CharMapObject2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Object2CharMap<T>key - that should be subtract fromvalue - that should be subtractpublic java.util.Comparator<T> comparator()
comparator in interface java.util.SortedMap<T,java.lang.Character>comparator in interface Object2CharSortedMap<T>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Character>containsKey in class AbstractObject2CharMap<T>public char getChar(T key)
Object2CharMapgetChar in interface Object2CharMap<T>key - the key that is searched forpublic char getOrDefault(T key, char defaultValue)
Object2CharMapgetOrDefault in interface Object2CharMap<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.Character>public T pollFirstKey()
Object2CharSortedMappollFirstKey in interface Object2CharSortedMap<T>public T lastKey()
lastKey in interface java.util.SortedMap<T,java.lang.Character>public T pollLastKey()
Object2CharSortedMappollLastKey in interface Object2CharSortedMap<T>public Object2CharMap.Entry<T> firstEntry()
firstEntry in interface java.util.NavigableMap<T,java.lang.Character>firstEntry in interface Object2CharNavigableMap<T>public Object2CharMap.Entry<T> lastEntry()
lastEntry in interface java.util.NavigableMap<T,java.lang.Character>lastEntry in interface Object2CharNavigableMap<T>public Object2CharMap.Entry<T> pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<T,java.lang.Character>pollFirstEntry in interface Object2CharNavigableMap<T>public Object2CharMap.Entry<T> pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<T,java.lang.Character>pollLastEntry in interface Object2CharNavigableMap<T>public char firstCharValue()
Object2CharSortedMapfirstCharValue in interface Object2CharSortedMap<T>public char lastCharValue()
Object2CharSortedMaplastCharValue in interface Object2CharSortedMap<T>public char rem(T key)
Object2CharMaprem in interface Object2CharMap<T>key - the element that should be removedpublic char remOrDefault(T key, char defaultValue)
Object2CharMapremOrDefault in interface Object2CharMap<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, char value)
Object2CharMapremove in interface Object2CharMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(T key, char oldValue, char newValue)
Object2CharMapreplace in interface Object2CharMap<T>replace in class AbstractObject2CharMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(T key, char value)
Object2CharMapreplace in interface Object2CharMap<T>replace in class AbstractObject2CharMap<T>key - the element that should be searched forvalue - the value to replace with.public char computeChar(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeChar in interface Object2CharMap<T>computeChar in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(T key, ToCharFunction<T> mappingFunction)
Object2CharMapcomputeCharIfAbsent in interface Object2CharMap<T>computeCharIfAbsent in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char supplyCharIfAbsent(T key, CharSupplier valueProvider)
Object2CharMapsupplyCharIfAbsent in interface Object2CharMap<T>supplyCharIfAbsent in class AbstractObject2CharMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic char computeCharIfPresent(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeCharIfPresent in interface Object2CharMap<T>computeCharIfPresent in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char mergeChar(T key, char value, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeChar in interface Object2CharMap<T>mergeChar in class AbstractObject2CharMap<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 mergeAllChar(Object2CharMap<T> m, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeAllChar in interface Object2CharMap<T>mergeAllChar in class AbstractObject2CharMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ObjectCharConsumer<T> action)
Object2CharMapforEach in interface Object2CharMap<T>forEach in class AbstractObject2CharMap<T>action - processor of the values that are iterator overpublic int size()
public void clear()
public Object2CharRBTreeMap<T> copy()
Object2CharMapcopy in interface Object2CharMap<T>copy in interface Object2CharNavigableMap<T>copy in interface Object2CharSortedMap<T>copy in class AbstractObject2CharMap<T>public ObjectNavigableSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Character>keySet in interface java.util.SortedMap<T,java.lang.Character>keySet in interface Object2CharMap<T>keySet in interface Object2CharNavigableMap<T>keySet in interface Object2CharSortedMap<T>keySet in class AbstractObject2CharMap<T>public ObjectSet<Object2CharMap.Entry<T>> object2CharEntrySet()
Object2CharMapobject2CharEntrySet in interface Object2CharMap<T>public CharCollection values()
values in interface java.util.Map<T,java.lang.Character>values in interface java.util.SortedMap<T,java.lang.Character>values in interface Object2CharMap<T>values in interface Object2CharSortedMap<T>values in class AbstractObject2CharMap<T>public ObjectNavigableSet<T> navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<T,java.lang.Character>navigableKeySet in interface Object2CharNavigableMap<T>public Object2CharNavigableMap<T> descendingMap()
descendingMap in interface java.util.NavigableMap<T,java.lang.Character>descendingMap in interface Object2CharNavigableMap<T>public ObjectNavigableSet<T> descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<T,java.lang.Character>descendingKeySet in interface Object2CharNavigableMap<T>public Object2CharNavigableMap<T> subMap(T fromKey, boolean fromInclusive, T toKey, boolean toInclusive)
subMap in interface java.util.NavigableMap<T,java.lang.Character>subMap in interface Object2CharNavigableMap<T>public Object2CharNavigableMap<T> headMap(T toKey, boolean inclusive)
headMap in interface java.util.NavigableMap<T,java.lang.Character>headMap in interface Object2CharNavigableMap<T>public Object2CharNavigableMap<T> tailMap(T fromKey, boolean inclusive)
tailMap in interface java.util.NavigableMap<T,java.lang.Character>tailMap in interface Object2CharNavigableMap<T>public T lowerKey(T e)
lowerKey in interface java.util.NavigableMap<T,java.lang.Character>public T floorKey(T e)
floorKey in interface java.util.NavigableMap<T,java.lang.Character>public T higherKey(T e)
higherKey in interface java.util.NavigableMap<T,java.lang.Character>public T ceilingKey(T e)
ceilingKey in interface java.util.NavigableMap<T,java.lang.Character>public Object2CharMap.Entry<T> lowerEntry(T key)
lowerEntry in interface java.util.NavigableMap<T,java.lang.Character>lowerEntry in interface Object2CharNavigableMap<T>public Object2CharMap.Entry<T> higherEntry(T key)
higherEntry in interface java.util.NavigableMap<T,java.lang.Character>higherEntry in interface Object2CharNavigableMap<T>public Object2CharMap.Entry<T> floorEntry(T key)
floorEntry in interface java.util.NavigableMap<T,java.lang.Character>floorEntry in interface Object2CharNavigableMap<T>public Object2CharMap.Entry<T> ceilingEntry(T key)
ceilingEntry in interface java.util.NavigableMap<T,java.lang.Character>ceilingEntry in interface Object2CharNavigableMap<T>