public class Byte2CharAVLTreeMap extends AbstractByte2CharMap implements Byte2CharNavigableMap
AbstractByte2CharMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2CharSortedMap.FastSortedSetByte2CharMap.BuilderCache, Byte2CharMap.Entry, Byte2CharMap.FastEntrySet, Byte2CharMap.MapBuilder| Constructor and Description |
|---|
Byte2CharAVLTreeMap()
Default Constructor
|
Byte2CharAVLTreeMap(byte[] keys,
char[] values)
Helper constructor that allow to create a map from unboxed values
|
Byte2CharAVLTreeMap(byte[] keys,
char[] values,
ByteComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Byte2CharAVLTreeMap(java.lang.Byte[] keys,
java.lang.Character[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2CharAVLTreeMap(java.lang.Byte[] keys,
java.lang.Character[] values,
ByteComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Byte2CharAVLTreeMap(Byte2CharMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2CharAVLTreeMap(Byte2CharMap map,
ByteComparator 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.
|
Byte2CharAVLTreeMap(ByteComparator comp)
Constructor that allows to define the sorter
|
Byte2CharAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Character> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2CharAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Character> map,
ByteComparator 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 |
|---|---|
char |
addTo(byte key,
char value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2CharMap.Entry> |
byte2CharEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Byte2CharMap.Entry |
ceilingEntry(byte key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
byte |
ceilingKey(byte e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
ByteComparator |
comparator() |
char |
computeChar(byte key,
ByteCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(byte key,
Byte2CharFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(byte key,
ByteCharUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
Byte2CharAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ByteNavigableSet |
descendingKeySet() |
Byte2CharNavigableMap |
descendingMap() |
byte |
firstByteKey()
A method to get the first Key of a Map.
|
char |
firstCharValue()
A method to get the first Value of a Map.
|
Byte2CharMap.Entry |
firstEntry() |
Byte2CharMap.Entry |
floorEntry(byte key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
byte |
floorKey(byte e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(ByteCharConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
char |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
byte |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
char |
getOrDefault(byte key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Byte2CharNavigableMap |
headMap(byte toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Byte2CharMap.Entry |
higherEntry(byte key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
byte |
higherKey(byte e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ByteNavigableSet |
keySet() |
byte |
lastByteKey()
A method to get the last Key of a Map.
|
char |
lastCharValue()
A method to get the last Value of a Map.
|
Byte2CharMap.Entry |
lastEntry() |
Byte2CharMap.Entry |
lowerEntry(byte key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
byte |
lowerKey(byte e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllChar(Byte2CharMap m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(byte key,
char value,
CharCharUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ByteNavigableSet |
navigableKeySet() |
byte |
pollFirstByteKey()
A method to get and remove the first Key of a Map.
|
Byte2CharMap.Entry |
pollFirstEntry() |
byte |
pollLastByteKey()
A method to get and remove the last Key of a Map.
|
Byte2CharMap.Entry |
pollLastEntry() |
char |
put(byte key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putIfAbsent(byte key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
removeOrDefault(byte key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
char |
replace(byte key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(byte value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(byte value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
char |
subFrom(byte key,
char value)
A Helper method to subtract from primitive from each other.
|
Byte2CharNavigableMap |
subMap(byte fromKey,
boolean fromInclusive,
byte toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
char |
supplyCharIfAbsent(byte key,
CharSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Byte2CharNavigableMap |
tailMap(byte 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, applyAsChar, 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, replaceChars, replaceChars, setDefaultReturnValuepublic Byte2CharAVLTreeMap()
public Byte2CharAVLTreeMap(ByteComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Byte2CharAVLTreeMap(java.lang.Byte[] 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 Byte2CharAVLTreeMap(java.lang.Byte[] keys,
java.lang.Character[] values,
ByteComparator 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 Byte2CharAVLTreeMap(byte[] 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 Byte2CharAVLTreeMap(byte[] keys,
char[] values,
ByteComparator 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 Byte2CharAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Character> map)
map - the values that should be present in the mappublic Byte2CharAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Character> map,
ByteComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Byte2CharAVLTreeMap(Byte2CharMap map)
map - the values that should be present in the mappublic Byte2CharAVLTreeMap(Byte2CharMap map, ByteComparator 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(byte value)
Byte2CharNavigableMapsetDefaultMaxValue in interface Byte2CharNavigableMapvalue - the new max valuepublic byte getDefaultMaxValue()
Byte2CharNavigableMapgetDefaultMaxValue in interface Byte2CharNavigableMappublic void setDefaultMinValue(byte value)
Byte2CharNavigableMapsetDefaultMinValue in interface Byte2CharNavigableMapvalue - the new min valuepublic byte getDefaultMinValue()
Byte2CharNavigableMapgetDefaultMinValue in interface Byte2CharNavigableMappublic char put(byte key,
char value)
Byte2CharMapput in interface Byte2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(byte key,
char value)
Byte2CharMapputIfAbsent in interface Byte2CharMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(byte key,
char value)
Byte2CharMapaddTo in interface Byte2CharMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic char subFrom(byte key,
char value)
Byte2CharMapByte2CharMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Byte2CharMapkey - that should be subtract fromvalue - that should be subtractpublic ByteComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Byte,java.lang.Character>comparator in interface Byte2CharSortedMappublic boolean containsKey(byte key)
Byte2CharMapcontainsKey in interface Byte2CharMapcontainsKey in class AbstractByte2CharMapkey - element that is searched forpublic char get(byte key)
Byte2CharMapget in interface Byte2CharMapkey - the key that is searched forpublic char getOrDefault(byte key,
char defaultValue)
Byte2CharMapgetOrDefault in interface Byte2CharMapgetOrDefault in class AbstractByte2CharMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte firstByteKey()
Byte2CharSortedMapfirstByteKey in interface Byte2CharSortedMappublic byte pollFirstByteKey()
Byte2CharSortedMappollFirstByteKey in interface Byte2CharSortedMappublic byte lastByteKey()
Byte2CharSortedMaplastByteKey in interface Byte2CharSortedMappublic byte pollLastByteKey()
Byte2CharSortedMappollLastByteKey in interface Byte2CharSortedMappublic Byte2CharMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>firstEntry in interface Byte2CharNavigableMappublic Byte2CharMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>lastEntry in interface Byte2CharNavigableMappublic Byte2CharMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>pollFirstEntry in interface Byte2CharNavigableMappublic Byte2CharMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>pollLastEntry in interface Byte2CharNavigableMappublic char firstCharValue()
Byte2CharSortedMapfirstCharValue in interface Byte2CharSortedMappublic char lastCharValue()
Byte2CharSortedMaplastCharValue in interface Byte2CharSortedMappublic char remove(byte key)
Byte2CharMapremove in interface Byte2CharMapkey - the element that should be removedpublic char removeOrDefault(byte key,
char defaultValue)
Byte2CharMapremoveOrDefault in interface Byte2CharMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(byte key,
char value)
Byte2CharMapremove in interface Byte2CharMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(byte key,
char oldValue,
char newValue)
Byte2CharMapreplace in interface Byte2CharMapreplace in class AbstractByte2CharMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(byte key,
char value)
Byte2CharMapreplace in interface Byte2CharMapreplace in class AbstractByte2CharMapkey - the element that should be searched forvalue - the value to replace with.public char computeChar(byte key,
ByteCharUnaryOperator mappingFunction)
Byte2CharMapcomputeChar in interface Byte2CharMapcomputeChar in class AbstractByte2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(byte key,
Byte2CharFunction mappingFunction)
Byte2CharMapcomputeCharIfAbsent in interface Byte2CharMapcomputeCharIfAbsent in class AbstractByte2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char supplyCharIfAbsent(byte key,
CharSupplier valueProvider)
Byte2CharMapsupplyCharIfAbsent in interface Byte2CharMapsupplyCharIfAbsent in class AbstractByte2CharMapkey - the key that should be computedvalueProvider - the value if not presentpublic char computeCharIfPresent(byte key,
ByteCharUnaryOperator mappingFunction)
Byte2CharMapcomputeCharIfPresent in interface Byte2CharMapcomputeCharIfPresent in class AbstractByte2CharMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char mergeChar(byte key,
char value,
CharCharUnaryOperator mappingFunction)
Byte2CharMapmergeChar in interface Byte2CharMapmergeChar in class AbstractByte2CharMapkey - 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(Byte2CharMap m, CharCharUnaryOperator mappingFunction)
Byte2CharMapmergeAllChar in interface Byte2CharMapmergeAllChar in class AbstractByte2CharMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ByteCharConsumer action)
Byte2CharMapforEach in interface Byte2CharMapforEach in class AbstractByte2CharMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Character>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Character>public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Character>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Character>public Byte2CharAVLTreeMap copy()
Byte2CharMapcopy in interface Byte2CharMapcopy in interface Byte2CharNavigableMapcopy in interface Byte2CharSortedMapcopy in class AbstractByte2CharMappublic ByteNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Character>keySet in interface java.util.SortedMap<java.lang.Byte,java.lang.Character>keySet in interface Byte2CharMapkeySet in interface Byte2CharNavigableMapkeySet in interface Byte2CharSortedMapkeySet in class AbstractByte2CharMappublic ObjectSet<Byte2CharMap.Entry> byte2CharEntrySet()
Byte2CharMapbyte2CharEntrySet in interface Byte2CharMappublic CharCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Character>values in interface java.util.SortedMap<java.lang.Byte,java.lang.Character>values in interface Byte2CharMapvalues in interface Byte2CharSortedMapvalues in class AbstractByte2CharMappublic ByteNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>navigableKeySet in interface Byte2CharNavigableMappublic Byte2CharNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>descendingMap in interface Byte2CharNavigableMappublic ByteNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Byte,java.lang.Character>descendingKeySet in interface Byte2CharNavigableMappublic Byte2CharNavigableMap subMap(byte fromKey, boolean fromInclusive, byte toKey, boolean toInclusive)
Byte2CharNavigableMapsubMap in interface Byte2CharNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Byte2CharNavigableMap headMap(byte toKey, boolean inclusive)
Byte2CharNavigableMapheadMap in interface Byte2CharNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Byte2CharNavigableMap tailMap(byte fromKey, boolean inclusive)
Byte2CharNavigableMaptailMap in interface Byte2CharNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic byte lowerKey(byte e)
Byte2CharNavigableMaplowerKey in interface Byte2CharNavigableMape - that should be compared with.public byte floorKey(byte e)
Byte2CharNavigableMapfloorKey in interface Byte2CharNavigableMape - that should be compared with.public byte higherKey(byte e)
Byte2CharNavigableMaphigherKey in interface Byte2CharNavigableMape - that should be compared with.public byte ceilingKey(byte e)
Byte2CharNavigableMapceilingKey in interface Byte2CharNavigableMape - that should be compared with.public Byte2CharMap.Entry lowerEntry(byte key)
Byte2CharNavigableMaplowerEntry in interface Byte2CharNavigableMapkey - that should be compared with.public Byte2CharMap.Entry higherEntry(byte key)
Byte2CharNavigableMaphigherEntry in interface Byte2CharNavigableMapkey - that should be compared with.public Byte2CharMap.Entry floorEntry(byte key)
Byte2CharNavigableMapfloorEntry in interface Byte2CharNavigableMapkey - that should be compared with.public Byte2CharMap.Entry ceilingEntry(byte key)
Byte2CharNavigableMapceilingEntry in interface Byte2CharNavigableMapkey - that should be compared with.