public class Short2ByteAVLTreeMap extends AbstractShort2ByteMap implements Short2ByteNavigableMap
AbstractShort2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ByteSortedMap.FastSortedSetShort2ByteMap.FastEntrySet| Constructor and Description |
|---|
Short2ByteAVLTreeMap()
Default Constructor
|
Short2ByteAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2ByteAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> 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.
|
Short2ByteAVLTreeMap(short[] keys,
byte[] values)
Helper constructor that allow to create a map from unboxed values
|
Short2ByteAVLTreeMap(java.lang.Short[] keys,
java.lang.Byte[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2ByteAVLTreeMap(short[] keys,
byte[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Short2ByteAVLTreeMap(java.lang.Short[] keys,
java.lang.Byte[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Short2ByteAVLTreeMap(Short2ByteMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2ByteAVLTreeMap(Short2ByteMap 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.
|
Short2ByteAVLTreeMap(ShortComparator comp)
Constructor that allows to define the sorter
|
| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(short key,
byte value)
A Helper method to add a primitives together.
|
Short2ByteMap.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() |
byte |
computeByte(short key,
ShortByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(short key,
Short2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(short key,
ShortByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
ShortNavigableSet |
descendingKeySet() |
Short2ByteNavigableMap |
descendingMap() |
byte |
firstByteValue()
A method to get the first Value of a Map.
|
Short2ByteMap.Entry |
firstEntry() |
short |
firstShortKey()
A method to get the first Key of a Map.
|
Short2ByteMap.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.
|
byte |
getAndMoveToFirst(short key)
A Specific get method that allows to move teh given key/value int the first index.
|
byte |
getAndMoveToLast(short key)
A Specific get method that allows to move teh given key/value int the last index.
|
byte |
getByte(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.
|
byte |
getOrDefault(short key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Short2ByteNavigableMap |
headMap(short toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Short2ByteMap.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.
|
ShortSortedSet |
keySet() |
byte |
lastByteValue()
A method to get the last Value of a Map.
|
Short2ByteMap.Entry |
lastEntry() |
short |
lastShortKey()
A method to get the last Key of a Map.
|
Short2ByteMap.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 |
mergeAllByte(Short2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(short key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(short key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(short key)
A specific move method to move a given key/value to the last index.
|
ShortNavigableSet |
navigableKeySet() |
Short2ByteMap.Entry |
pollFirstEntry() |
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
Short2ByteMap.Entry |
pollLastEntry() |
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
byte |
put(short key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putAndMoveToFirst(short key,
byte value)
A customized put method that allows you to insert into the first index.
|
byte |
putAndMoveToLast(short key,
byte value)
A customized put method that allows you to insert into the last index.
|
byte |
putIfAbsent(short key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
remove(short key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
remShort(short key)
Type Specific remove function to reduce boxing/unboxing
|
byte |
remShortOrDefault(short key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
replace(short key,
byte value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(short key,
byte oldValue,
byte 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<Short2ByteMap.Entry> |
short2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
Short2ByteNavigableMap |
subMap(short fromKey,
boolean fromInclusive,
short toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
Short2ByteNavigableMap |
tailMap(short fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
ByteCollection |
values() |
addToAll, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceBytes, replaceBytes, setDefaultReturnValuecontainsKey, containsValue, isEmpty, put, remove, toStringceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, tailMap, tailMap, tailMapfirstKey, lastKeyaddToAll, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceBytes, replaceBytes, setDefaultReturnValuepublic Short2ByteAVLTreeMap()
public Short2ByteAVLTreeMap(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Short2ByteAVLTreeMap(java.lang.Short[] keys,
java.lang.Byte[] 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 Short2ByteAVLTreeMap(java.lang.Short[] keys,
java.lang.Byte[] 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 Short2ByteAVLTreeMap(short[] keys,
byte[] 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 Short2ByteAVLTreeMap(short[] keys,
byte[] 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 Short2ByteAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> map)
map - the values that should be present in the mappublic Short2ByteAVLTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Byte> 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 Short2ByteAVLTreeMap(Short2ByteMap map)
map - the values that should be present in the mappublic Short2ByteAVLTreeMap(Short2ByteMap 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)
Short2ByteNavigableMapsetDefaultMaxValue in interface Short2ByteNavigableMapvalue - the new max valuepublic short getDefaultMaxValue()
Short2ByteNavigableMapgetDefaultMaxValue in interface Short2ByteNavigableMappublic void setDefaultMinValue(short value)
Short2ByteNavigableMapsetDefaultMinValue in interface Short2ByteNavigableMapvalue - the new min valuepublic short getDefaultMinValue()
Short2ByteNavigableMapgetDefaultMinValue in interface Short2ByteNavigableMappublic byte put(short key,
byte value)
Short2ByteMapput in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(short key,
byte value)
Short2ByteMapputIfAbsent in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(short key,
byte value)
Short2ByteMapaddTo in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte putAndMoveToFirst(short key,
byte value)
Short2ByteSortedMapputAndMoveToFirst in interface Short2ByteSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public byte putAndMoveToLast(short key,
byte value)
Short2ByteSortedMapputAndMoveToLast in interface Short2ByteSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(short key)
Short2ByteSortedMapmoveToFirst in interface Short2ByteSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(short key)
Short2ByteSortedMapmoveToLast in interface Short2ByteSortedMapkey - that should be moved to the first lastpublic byte getAndMoveToFirst(short key)
Short2ByteSortedMapgetAndMoveToFirst in interface Short2ByteSortedMapkey - that is searched forpublic byte getAndMoveToLast(short key)
Short2ByteSortedMapgetAndMoveToLast in interface Short2ByteSortedMapkey - that is searched forpublic ShortComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Short,java.lang.Byte>comparator in interface Short2ByteSortedMappublic boolean containsKey(short key)
Short2ByteMapcontainsKey in interface Short2ByteMapcontainsKey in class AbstractShort2ByteMapkey - element that is searched forpublic byte getByte(short key)
Short2ByteMapgetByte in interface Short2ByteFunctiongetByte in interface Short2ByteMapkey - the key that is searched forpublic byte getOrDefault(short key,
byte defaultValue)
Short2ByteMapgetOrDefault in interface Short2ByteMapgetOrDefault in class AbstractShort2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short firstShortKey()
Short2ByteSortedMapfirstShortKey in interface Short2ByteSortedMappublic short pollFirstShortKey()
Short2ByteSortedMappollFirstShortKey in interface Short2ByteSortedMappublic short lastShortKey()
Short2ByteSortedMaplastShortKey in interface Short2ByteSortedMappublic short pollLastShortKey()
Short2ByteSortedMappollLastShortKey in interface Short2ByteSortedMappublic Short2ByteMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>firstEntry in interface Short2ByteNavigableMappublic Short2ByteMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>lastEntry in interface Short2ByteNavigableMappublic Short2ByteMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>pollFirstEntry in interface Short2ByteNavigableMappublic Short2ByteMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>pollLastEntry in interface Short2ByteNavigableMappublic byte firstByteValue()
Short2ByteSortedMapfirstByteValue in interface Short2ByteSortedMappublic byte lastByteValue()
Short2ByteSortedMaplastByteValue in interface Short2ByteSortedMappublic byte remShort(short key)
Short2ByteMapremShort in interface Short2ByteMapkey - the element that should be removedpublic byte remShortOrDefault(short key,
byte defaultValue)
Short2ByteMapremShortOrDefault in interface Short2ByteMapkey - 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,
byte value)
Short2ByteMapremove in interface Short2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
byte oldValue,
byte newValue)
Short2ByteMapreplace in interface Short2ByteMapreplace in class AbstractShort2ByteMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public byte replace(short key,
byte value)
Short2ByteMapreplace in interface Short2ByteMapreplace in class AbstractShort2ByteMapkey - the element that should be searched forvalue - the value to replace with.public byte computeByte(short key,
ShortByteUnaryOperator mappingFunction)
Short2ByteMapcomputeByte in interface Short2ByteMapcomputeByte in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(short key,
Short2ByteFunction mappingFunction)
Short2ByteMapcomputeByteIfAbsent in interface Short2ByteMapcomputeByteIfAbsent in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(short key,
ShortByteUnaryOperator mappingFunction)
Short2ByteMapcomputeByteIfPresent in interface Short2ByteMapcomputeByteIfPresent in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte mergeByte(short key,
byte value,
ByteByteUnaryOperator mappingFunction)
Short2ByteMapmergeByte in interface Short2ByteMapmergeByte in class AbstractShort2ByteMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllByte(Short2ByteMap m, ByteByteUnaryOperator mappingFunction)
Short2ByteMapmergeAllByte in interface Short2ByteMapmergeAllByte in class AbstractShort2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Byte>size in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>public ShortSortedSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Byte>keySet in interface java.util.SortedMap<java.lang.Short,java.lang.Byte>keySet in interface Short2ByteMapkeySet in interface Short2ByteSortedMapkeySet in class AbstractShort2ByteMappublic ObjectSet<Short2ByteMap.Entry> short2ByteEntrySet()
Short2ByteMapshort2ByteEntrySet in interface Short2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Byte>values in interface java.util.SortedMap<java.lang.Short,java.lang.Byte>values in interface Short2ByteMapvalues in interface Short2ByteSortedMapvalues in class AbstractShort2ByteMappublic ShortNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>navigableKeySet in interface Short2ByteNavigableMappublic Short2ByteNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>descendingMap in interface Short2ByteNavigableMappublic ShortNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Byte>descendingKeySet in interface Short2ByteNavigableMappublic Short2ByteNavigableMap subMap(short fromKey, boolean fromInclusive, short toKey, boolean toInclusive)
Short2ByteNavigableMapsubMap in interface Short2ByteNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Short2ByteNavigableMap headMap(short toKey, boolean inclusive)
Short2ByteNavigableMapheadMap in interface Short2ByteNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Short2ByteNavigableMap tailMap(short fromKey, boolean inclusive)
Short2ByteNavigableMaptailMap in interface Short2ByteNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic short lowerKey(short e)
Short2ByteNavigableMaplowerKey in interface Short2ByteNavigableMape - that should be compared with.public short floorKey(short e)
Short2ByteNavigableMapfloorKey in interface Short2ByteNavigableMape - that should be compared with.public short higherKey(short e)
Short2ByteNavigableMaphigherKey in interface Short2ByteNavigableMape - that should be compared with.public short ceilingKey(short e)
Short2ByteNavigableMapceilingKey in interface Short2ByteNavigableMape - that should be compared with.public Short2ByteMap.Entry lowerEntry(short key)
Short2ByteNavigableMaplowerEntry in interface Short2ByteNavigableMapkey - that should be compared with.public Short2ByteMap.Entry higherEntry(short key)
Short2ByteNavigableMaphigherEntry in interface Short2ByteNavigableMapkey - that should be compared with.public Short2ByteMap.Entry floorEntry(short key)
Short2ByteNavigableMapfloorEntry in interface Short2ByteNavigableMapkey - that should be compared with.public Short2ByteMap.Entry ceilingEntry(short key)
Short2ByteNavigableMapceilingEntry in interface Short2ByteNavigableMapkey - that should be compared with.