public class Short2CharRBTreeMap extends AbstractShort2CharMap implements Short2CharNavigableMap
AbstractShort2CharMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2CharSortedMap.FastSortedSetShort2CharMap.BuilderCache, Short2CharMap.Entry, Short2CharMap.FastEntrySet, Short2CharMap.MapBuilder| Constructor and Description |
|---|
Short2CharRBTreeMap()
Default Constructor
|
Short2CharRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Character> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2CharRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Character> map,
ShortComparator comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
Short2CharRBTreeMap(short[] keys,
char[] values)
Helper constructor that allow to create a map from unboxed values
|
Short2CharRBTreeMap(short[] keys,
char[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Short2CharRBTreeMap(java.lang.Short[] keys,
java.lang.Character[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2CharRBTreeMap(java.lang.Short[] keys,
java.lang.Character[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Short2CharRBTreeMap(Short2CharMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2CharRBTreeMap(Short2CharMap map,
ShortComparator 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.
|
Short2CharRBTreeMap(ShortComparator comp)
Constructor that allows to define the sorter
|
| Modifier and Type | Method and Description |
|---|---|
char |
addTo(short key,
char value)
A Helper method to add a primitives together.
|
Short2CharMap.Entry |
ceilingEntry(short key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
short |
ceilingKey(short e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
ShortComparator |
comparator() |
char |
computeChar(short key,
ShortCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(short key,
Short2CharFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(short key,
ShortCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
Short2CharRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ShortNavigableSet |
descendingKeySet() |
Short2CharNavigableMap |
descendingMap() |
char |
firstCharValue()
A method to get the first Value of a Map.
|
Short2CharMap.Entry |
firstEntry() |
short |
firstShortKey()
A method to get the first Key of a Map.
|
Short2CharMap.Entry |
floorEntry(short key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
short |
floorKey(short e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(ShortCharConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
char |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
short |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
short |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
char |
getOrDefault(short key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Short2CharNavigableMap |
headMap(short toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Short2CharMap.Entry |
higherEntry(short key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
short |
higherKey(short e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ShortNavigableSet |
keySet() |
char |
lastCharValue()
A method to get the last Value of a Map.
|
Short2CharMap.Entry |
lastEntry() |
short |
lastShortKey()
A method to get the last Key of a Map.
|
Short2CharMap.Entry |
lowerEntry(short key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
short |
lowerKey(short e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllChar(Short2CharMap m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(short key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ShortNavigableSet |
navigableKeySet() |
Short2CharMap.Entry |
pollFirstEntry() |
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
Short2CharMap.Entry |
pollLastEntry() |
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
char |
put(short key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(short key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
removeOrDefault(short key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
char |
replace(short key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(short key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(short value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(short value)
A Helper method to set the min value for SubMaps.
|
ObjectSet<Short2CharMap.Entry> |
short2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
char |
subFrom(short key,
char value)
A Helper method to subtract from primitive from each other.
|
Short2CharNavigableMap |
subMap(short fromKey,
boolean fromInclusive,
short toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
char |
supplyCharIfAbsent(short key,
CharSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Short2CharNavigableMap |
tailMap(short fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
CharCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceChars, replaceChars, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceChars, replaceChars, setDefaultReturnValuepublic Short2CharRBTreeMap()
public Short2CharRBTreeMap(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Short2CharRBTreeMap(java.lang.Short[] 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 Short2CharRBTreeMap(java.lang.Short[] keys,
java.lang.Character[] values,
ShortComparator 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 Short2CharRBTreeMap(short[] 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 Short2CharRBTreeMap(short[] keys,
char[] values,
ShortComparator 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 Short2CharRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Character> map)
map - the values that should be present in the mappublic Short2CharRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Character> map,
ShortComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Short2CharRBTreeMap(Short2CharMap map)
map - the values that should be present in the mappublic Short2CharRBTreeMap(Short2CharMap map, ShortComparator 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(short value)
Short2CharNavigableMapsetDefaultMaxValue in interface Short2CharNavigableMapvalue - the new max valuepublic short getDefaultMaxValue()
Short2CharNavigableMapgetDefaultMaxValue in interface Short2CharNavigableMappublic void setDefaultMinValue(short value)
Short2CharNavigableMapsetDefaultMinValue in interface Short2CharNavigableMapvalue - the new min valuepublic short getDefaultMinValue()
Short2CharNavigableMapgetDefaultMinValue in interface Short2CharNavigableMappublic char put(short key,
char value)
Short2CharMapput in interface Short2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(short key,
char value)
Short2CharMapputIfAbsent in interface Short2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(short key,
char value)
Short2CharMapaddTo in interface Short2CharMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(short key,
char value)
Short2CharMapShort2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Short2CharMapkey - that should be subtract fromvalue - that should be subtractpublic ShortComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Short,java.lang.Character>comparator in interface Short2CharSortedMappublic boolean containsKey(short key)
Short2CharMapcontainsKey in interface Short2CharMapcontainsKey in class AbstractShort2CharMapkey - element that is searched forpublic char get(short key)
Short2CharMapget in interface Short2CharFunctionget in interface Short2CharMapkey - the key that is searched forpublic char getOrDefault(short key,
char defaultValue)
Short2CharMapgetOrDefault in interface Short2CharMapgetOrDefault in class AbstractShort2CharMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short firstShortKey()
Short2CharSortedMapfirstShortKey in interface Short2CharSortedMappublic short pollFirstShortKey()
Short2CharSortedMappollFirstShortKey in interface Short2CharSortedMappublic short lastShortKey()
Short2CharSortedMaplastShortKey in interface Short2CharSortedMappublic short pollLastShortKey()
Short2CharSortedMappollLastShortKey in interface Short2CharSortedMappublic Short2CharMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>firstEntry in interface Short2CharNavigableMappublic Short2CharMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>lastEntry in interface Short2CharNavigableMappublic Short2CharMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>pollFirstEntry in interface Short2CharNavigableMappublic Short2CharMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>pollLastEntry in interface Short2CharNavigableMappublic char firstCharValue()
Short2CharSortedMapfirstCharValue in interface Short2CharSortedMappublic char lastCharValue()
Short2CharSortedMaplastCharValue in interface Short2CharSortedMappublic char remove(short key)
Short2CharMapremove in interface Short2CharMapkey - the element that should be removedpublic char removeOrDefault(short key,
char defaultValue)
Short2CharMapremoveOrDefault in interface Short2CharMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
char value)
Short2CharMapremove in interface Short2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
char oldValue,
char newValue)
Short2CharMapreplace in interface Short2CharMapreplace in class AbstractShort2CharMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(short key,
char value)
Short2CharMapreplace in interface Short2CharMapreplace in class AbstractShort2CharMapkey - the element that should be searched forvalue - the value to replace with.public char computeChar(short key,
ShortCharUnaryOperator mappingFunction)
Short2CharMapcomputeChar in interface Short2CharMapcomputeChar in class AbstractShort2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(short key,
Short2CharFunction mappingFunction)
Short2CharMapcomputeCharIfAbsent in interface Short2CharMapcomputeCharIfAbsent in class AbstractShort2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char supplyCharIfAbsent(short key,
CharSupplier valueProvider)
Short2CharMapsupplyCharIfAbsent in interface Short2CharMapsupplyCharIfAbsent in class AbstractShort2CharMapkey - the key that should be computedvalueProvider - the value if not presentpublic char computeCharIfPresent(short key,
ShortCharUnaryOperator mappingFunction)
Short2CharMapcomputeCharIfPresent in interface Short2CharMapcomputeCharIfPresent in class AbstractShort2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char mergeChar(short key,
char value,
CharCharUnaryOperator mappingFunction)
Short2CharMapmergeChar in interface Short2CharMapmergeChar in class AbstractShort2CharMapkey - 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(Short2CharMap m, CharCharUnaryOperator mappingFunction)
Short2CharMapmergeAllChar in interface Short2CharMapmergeAllChar in class AbstractShort2CharMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ShortCharConsumer action)
Short2CharMapforEach in interface Short2CharMapforEach in class AbstractShort2CharMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Character>size in class java.util.AbstractMap<java.lang.Short,java.lang.Character>public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Character>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Character>public Short2CharRBTreeMap copy()
Short2CharMapcopy in interface Short2CharMapcopy in interface Short2CharNavigableMapcopy in interface Short2CharSortedMapcopy in class AbstractShort2CharMappublic ShortNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Character>keySet in interface java.util.SortedMap<java.lang.Short,java.lang.Character>keySet in interface Short2CharMapkeySet in interface Short2CharNavigableMapkeySet in interface Short2CharSortedMapkeySet in class AbstractShort2CharMappublic ObjectSet<Short2CharMap.Entry> short2CharEntrySet()
Short2CharMapshort2CharEntrySet in interface Short2CharMappublic CharCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Character>values in interface java.util.SortedMap<java.lang.Short,java.lang.Character>values in interface Short2CharMapvalues in interface Short2CharSortedMapvalues in class AbstractShort2CharMappublic ShortNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>navigableKeySet in interface Short2CharNavigableMappublic Short2CharNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>descendingMap in interface Short2CharNavigableMappublic ShortNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Character>descendingKeySet in interface Short2CharNavigableMappublic Short2CharNavigableMap subMap(short fromKey, boolean fromInclusive, short toKey, boolean toInclusive)
Short2CharNavigableMapsubMap in interface Short2CharNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Short2CharNavigableMap headMap(short toKey, boolean inclusive)
Short2CharNavigableMapheadMap in interface Short2CharNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Short2CharNavigableMap tailMap(short fromKey, boolean inclusive)
Short2CharNavigableMaptailMap in interface Short2CharNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic short lowerKey(short e)
Short2CharNavigableMaplowerKey in interface Short2CharNavigableMape - that should be compared with.public short floorKey(short e)
Short2CharNavigableMapfloorKey in interface Short2CharNavigableMape - that should be compared with.public short higherKey(short e)
Short2CharNavigableMaphigherKey in interface Short2CharNavigableMape - that should be compared with.public short ceilingKey(short e)
Short2CharNavigableMapceilingKey in interface Short2CharNavigableMape - that should be compared with.public Short2CharMap.Entry lowerEntry(short key)
Short2CharNavigableMaplowerEntry in interface Short2CharNavigableMapkey - that should be compared with.public Short2CharMap.Entry higherEntry(short key)
Short2CharNavigableMaphigherEntry in interface Short2CharNavigableMapkey - that should be compared with.public Short2CharMap.Entry floorEntry(short key)
Short2CharNavigableMapfloorEntry in interface Short2CharNavigableMapkey - that should be compared with.public Short2CharMap.Entry ceilingEntry(short key)
Short2CharNavigableMapceilingEntry in interface Short2CharNavigableMapkey - that should be compared with.