public class Byte2LongAVLTreeMap extends AbstractByte2LongMap implements Byte2LongNavigableMap
AbstractByte2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2LongSortedMap.FastSortedSetByte2LongMap.FastEntrySet| Constructor and Description |
|---|
Byte2LongAVLTreeMap()
Default Constructor
|
Byte2LongAVLTreeMap(byte[] keys,
long[] values)
Helper constructor that allow to create a map from unboxed values
|
Byte2LongAVLTreeMap(java.lang.Byte[] keys,
java.lang.Long[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2LongAVLTreeMap(byte[] keys,
long[] values,
ByteComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Byte2LongAVLTreeMap(java.lang.Byte[] keys,
java.lang.Long[] values,
ByteComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Byte2LongAVLTreeMap(Byte2LongMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2LongAVLTreeMap(Byte2LongMap 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.
|
Byte2LongAVLTreeMap(ByteComparator comp)
Constructor that allows to define the sorter
|
Byte2LongAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2LongAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> 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 |
|---|---|
long |
addTo(byte key,
long value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2LongMap.Entry> |
byte2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Byte2LongMap.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() |
long |
computeLong(byte key,
ByteLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(byte key,
Byte2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(byte key,
ByteLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
ByteNavigableSet |
descendingKeySet() |
Byte2LongNavigableMap |
descendingMap() |
byte |
firstByteKey()
A method to get the first Key of a Map.
|
Byte2LongMap.Entry |
firstEntry() |
long |
firstLongValue()
A method to get the first Value of a Map.
|
Byte2LongMap.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.
|
long |
getAndMoveToFirst(byte key)
A Specific get method that allows to move teh given key/value int the first index.
|
long |
getAndMoveToLast(byte key)
A Specific get method that allows to move teh given key/value int the last index.
|
byte |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
byte |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
long |
getLong(byte key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(byte key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Byte2LongNavigableMap |
headMap(byte toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Byte2LongMap.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.
|
ByteSortedSet |
keySet() |
byte |
lastByteKey()
A method to get the last Key of a Map.
|
Byte2LongMap.Entry |
lastEntry() |
long |
lastLongValue()
A method to get the last Value of a Map.
|
Byte2LongMap.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 |
mergeAllLong(Byte2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(byte key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(byte key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(byte key)
A specific move method to move a given key/value to the last index.
|
ByteNavigableSet |
navigableKeySet() |
byte |
pollFirstByteKey()
A method to get and remove the first Key of a Map.
|
Byte2LongMap.Entry |
pollFirstEntry() |
byte |
pollLastByteKey()
A method to get and remove the last Key of a Map.
|
Byte2LongMap.Entry |
pollLastEntry() |
long |
put(byte key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putAndMoveToFirst(byte key,
long value)
A customized put method that allows you to insert into the first index.
|
long |
putAndMoveToLast(byte key,
long value)
A customized put method that allows you to insert into the last index.
|
long |
putIfAbsent(byte key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remByte(byte key)
Type Specific remove function to reduce boxing/unboxing
|
long |
remByteOrDefault(byte key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(byte key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
replace(byte key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
long oldValue,
long 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() |
Byte2LongNavigableMap |
subMap(byte fromKey,
boolean fromInclusive,
byte toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
Byte2LongNavigableMap |
tailMap(byte fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
LongCollection |
values() |
addToAll, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceLongs, replaceLongs, 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, replaceLongs, replaceLongs, setDefaultReturnValuepublic Byte2LongAVLTreeMap()
public Byte2LongAVLTreeMap(ByteComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Byte2LongAVLTreeMap(java.lang.Byte[] keys,
java.lang.Long[] 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 Byte2LongAVLTreeMap(java.lang.Byte[] keys,
java.lang.Long[] 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 Byte2LongAVLTreeMap(byte[] keys,
long[] 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 Byte2LongAVLTreeMap(byte[] keys,
long[] 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 Byte2LongAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> map)
map - the values that should be present in the mappublic Byte2LongAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> 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 Byte2LongAVLTreeMap(Byte2LongMap map)
map - the values that should be present in the mappublic Byte2LongAVLTreeMap(Byte2LongMap 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)
Byte2LongNavigableMapsetDefaultMaxValue in interface Byte2LongNavigableMapvalue - the new max valuepublic byte getDefaultMaxValue()
Byte2LongNavigableMapgetDefaultMaxValue in interface Byte2LongNavigableMappublic void setDefaultMinValue(byte value)
Byte2LongNavigableMapsetDefaultMinValue in interface Byte2LongNavigableMapvalue - the new min valuepublic byte getDefaultMinValue()
Byte2LongNavigableMapgetDefaultMinValue in interface Byte2LongNavigableMappublic long put(byte key,
long value)
Byte2LongMapput in interface Byte2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(byte key,
long value)
Byte2LongMapputIfAbsent in interface Byte2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(byte key,
long value)
Byte2LongMapaddTo in interface Byte2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long putAndMoveToFirst(byte key,
long value)
Byte2LongSortedMapputAndMoveToFirst in interface Byte2LongSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public long putAndMoveToLast(byte key,
long value)
Byte2LongSortedMapputAndMoveToLast in interface Byte2LongSortedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(byte key)
Byte2LongSortedMapmoveToFirst in interface Byte2LongSortedMapkey - that should be moved to the first indexpublic boolean moveToLast(byte key)
Byte2LongSortedMapmoveToLast in interface Byte2LongSortedMapkey - that should be moved to the first lastpublic long getAndMoveToFirst(byte key)
Byte2LongSortedMapgetAndMoveToFirst in interface Byte2LongSortedMapkey - that is searched forpublic long getAndMoveToLast(byte key)
Byte2LongSortedMapgetAndMoveToLast in interface Byte2LongSortedMapkey - that is searched forpublic ByteComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Byte,java.lang.Long>comparator in interface Byte2LongSortedMappublic boolean containsKey(byte key)
Byte2LongMapcontainsKey in interface Byte2LongMapcontainsKey in class AbstractByte2LongMapkey - element that is searched forpublic long getLong(byte key)
Byte2LongMapgetLong in interface Byte2LongFunctiongetLong in interface Byte2LongMapkey - the key that is searched forpublic long getOrDefault(byte key,
long defaultValue)
Byte2LongMapgetOrDefault in interface Byte2LongMapgetOrDefault in class AbstractByte2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte firstByteKey()
Byte2LongSortedMapfirstByteKey in interface Byte2LongSortedMappublic byte pollFirstByteKey()
Byte2LongSortedMappollFirstByteKey in interface Byte2LongSortedMappublic byte lastByteKey()
Byte2LongSortedMaplastByteKey in interface Byte2LongSortedMappublic byte pollLastByteKey()
Byte2LongSortedMappollLastByteKey in interface Byte2LongSortedMappublic Byte2LongMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>firstEntry in interface Byte2LongNavigableMappublic Byte2LongMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>lastEntry in interface Byte2LongNavigableMappublic Byte2LongMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>pollFirstEntry in interface Byte2LongNavigableMappublic Byte2LongMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>pollLastEntry in interface Byte2LongNavigableMappublic long firstLongValue()
Byte2LongSortedMapfirstLongValue in interface Byte2LongSortedMappublic long lastLongValue()
Byte2LongSortedMaplastLongValue in interface Byte2LongSortedMappublic long remByte(byte key)
Byte2LongMapremByte in interface Byte2LongMapkey - the element that should be removedpublic long remByteOrDefault(byte key,
long defaultValue)
Byte2LongMapremByteOrDefault in interface Byte2LongMapkey - 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,
long value)
Byte2LongMapremove in interface Byte2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(byte key,
long oldValue,
long newValue)
Byte2LongMapreplace in interface Byte2LongMapreplace in class AbstractByte2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(byte key,
long value)
Byte2LongMapreplace in interface Byte2LongMapreplace in class AbstractByte2LongMapkey - the element that should be searched forvalue - the value to replace with.public long computeLong(byte key,
ByteLongUnaryOperator mappingFunction)
Byte2LongMapcomputeLong in interface Byte2LongMapcomputeLong in class AbstractByte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(byte key,
Byte2LongFunction mappingFunction)
Byte2LongMapcomputeLongIfAbsent in interface Byte2LongMapcomputeLongIfAbsent in class AbstractByte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(byte key,
ByteLongUnaryOperator mappingFunction)
Byte2LongMapcomputeLongIfPresent in interface Byte2LongMapcomputeLongIfPresent in class AbstractByte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(byte key,
long value,
LongLongUnaryOperator mappingFunction)
Byte2LongMapmergeLong in interface Byte2LongMapmergeLong in class AbstractByte2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Byte2LongMap m, LongLongUnaryOperator mappingFunction)
Byte2LongMapmergeAllLong in interface Byte2LongMapmergeAllLong in class AbstractByte2LongMapm - 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.Byte,java.lang.Long>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public ByteSortedSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Long>keySet in interface java.util.SortedMap<java.lang.Byte,java.lang.Long>keySet in interface Byte2LongMapkeySet in interface Byte2LongSortedMapkeySet in class AbstractByte2LongMappublic ObjectSet<Byte2LongMap.Entry> byte2LongEntrySet()
Byte2LongMapbyte2LongEntrySet in interface Byte2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Long>values in interface java.util.SortedMap<java.lang.Byte,java.lang.Long>values in interface Byte2LongMapvalues in interface Byte2LongSortedMapvalues in class AbstractByte2LongMappublic ByteNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>navigableKeySet in interface Byte2LongNavigableMappublic Byte2LongNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>descendingMap in interface Byte2LongNavigableMappublic ByteNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Byte,java.lang.Long>descendingKeySet in interface Byte2LongNavigableMappublic Byte2LongNavigableMap subMap(byte fromKey, boolean fromInclusive, byte toKey, boolean toInclusive)
Byte2LongNavigableMapsubMap in interface Byte2LongNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Byte2LongNavigableMap headMap(byte toKey, boolean inclusive)
Byte2LongNavigableMapheadMap in interface Byte2LongNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Byte2LongNavigableMap tailMap(byte fromKey, boolean inclusive)
Byte2LongNavigableMaptailMap in interface Byte2LongNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic byte lowerKey(byte e)
Byte2LongNavigableMaplowerKey in interface Byte2LongNavigableMape - that should be compared with.public byte floorKey(byte e)
Byte2LongNavigableMapfloorKey in interface Byte2LongNavigableMape - that should be compared with.public byte higherKey(byte e)
Byte2LongNavigableMaphigherKey in interface Byte2LongNavigableMape - that should be compared with.public byte ceilingKey(byte e)
Byte2LongNavigableMapceilingKey in interface Byte2LongNavigableMape - that should be compared with.public Byte2LongMap.Entry lowerEntry(byte key)
Byte2LongNavigableMaplowerEntry in interface Byte2LongNavigableMapkey - that should be compared with.public Byte2LongMap.Entry higherEntry(byte key)
Byte2LongNavigableMaphigherEntry in interface Byte2LongNavigableMapkey - that should be compared with.public Byte2LongMap.Entry floorEntry(byte key)
Byte2LongNavigableMapfloorEntry in interface Byte2LongNavigableMapkey - that should be compared with.public Byte2LongMap.Entry ceilingEntry(byte key)
Byte2LongNavigableMapceilingEntry in interface Byte2LongNavigableMapkey - that should be compared with.