public class Byte2DoubleAVLTreeMap extends AbstractByte2DoubleMap implements Byte2DoubleNavigableMap
AbstractByte2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2DoubleSortedMap.FastSortedSetByte2DoubleMap.BuilderCache, Byte2DoubleMap.Entry, Byte2DoubleMap.FastEntrySet, Byte2DoubleMap.MapBuilder| Constructor and Description |
|---|
Byte2DoubleAVLTreeMap()
Default Constructor
|
Byte2DoubleAVLTreeMap(byte[] keys,
double[] values)
Helper constructor that allow to create a map from unboxed values
|
Byte2DoubleAVLTreeMap(java.lang.Byte[] keys,
java.lang.Double[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Byte2DoubleAVLTreeMap(byte[] keys,
double[] values,
ByteComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Byte2DoubleAVLTreeMap(java.lang.Byte[] keys,
java.lang.Double[] values,
ByteComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Byte2DoubleAVLTreeMap(Byte2DoubleMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Byte2DoubleAVLTreeMap(Byte2DoubleMap 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.
|
Byte2DoubleAVLTreeMap(ByteComparator comp)
Constructor that allows to define the sorter
|
Byte2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Double> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Byte2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Double> 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 |
|---|---|
double |
addTo(byte key,
double value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2DoubleMap.Entry> |
byte2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Byte2DoubleMap.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() |
double |
computeDouble(byte key,
ByteDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(byte key,
Byte2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(byte key,
ByteDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
Byte2DoubleAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ByteNavigableSet |
descendingKeySet() |
Byte2DoubleNavigableMap |
descendingMap() |
byte |
firstByteKey()
A method to get the first Key of a Map.
|
double |
firstDoubleValue()
A method to get the first Value of a Map.
|
Byte2DoubleMap.Entry |
firstEntry() |
Byte2DoubleMap.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(ByteDoubleConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
double |
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.
|
double |
getOrDefault(byte key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Byte2DoubleNavigableMap |
headMap(byte toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Byte2DoubleMap.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.
|
double |
lastDoubleValue()
A method to get the last Value of a Map.
|
Byte2DoubleMap.Entry |
lastEntry() |
Byte2DoubleMap.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 |
mergeAllDouble(Byte2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(byte key,
double value,
DoubleDoubleUnaryOperator 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.
|
Byte2DoubleMap.Entry |
pollFirstEntry() |
byte |
pollLastByteKey()
A method to get and remove the last Key of a Map.
|
Byte2DoubleMap.Entry |
pollLastEntry() |
double |
put(byte key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(byte key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
removeOrDefault(byte key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
double |
replace(byte key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
double oldValue,
double 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() |
double |
subFrom(byte key,
double value)
A Helper method to subtract from primitive from each other.
|
Byte2DoubleNavigableMap |
subMap(byte fromKey,
boolean fromInclusive,
byte toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
double |
supplyDoubleIfAbsent(byte key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Byte2DoubleNavigableMap |
tailMap(byte fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
DoubleCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceDoubles, replaceDoubles, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, applyAsDouble, 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, replaceDoubles, replaceDoubles, setDefaultReturnValuepublic Byte2DoubleAVLTreeMap()
public Byte2DoubleAVLTreeMap(ByteComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Byte2DoubleAVLTreeMap(java.lang.Byte[] keys,
java.lang.Double[] 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 Byte2DoubleAVLTreeMap(java.lang.Byte[] keys,
java.lang.Double[] 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 Byte2DoubleAVLTreeMap(byte[] keys,
double[] 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 Byte2DoubleAVLTreeMap(byte[] keys,
double[] 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 Byte2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Double> map)
map - the values that should be present in the mappublic Byte2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Byte,? extends java.lang.Double> 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 Byte2DoubleAVLTreeMap(Byte2DoubleMap map)
map - the values that should be present in the mappublic Byte2DoubleAVLTreeMap(Byte2DoubleMap 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)
Byte2DoubleNavigableMapsetDefaultMaxValue in interface Byte2DoubleNavigableMapvalue - the new max valuepublic byte getDefaultMaxValue()
Byte2DoubleNavigableMapgetDefaultMaxValue in interface Byte2DoubleNavigableMappublic void setDefaultMinValue(byte value)
Byte2DoubleNavigableMapsetDefaultMinValue in interface Byte2DoubleNavigableMapvalue - the new min valuepublic byte getDefaultMinValue()
Byte2DoubleNavigableMapgetDefaultMinValue in interface Byte2DoubleNavigableMappublic double put(byte key,
double value)
Byte2DoubleMapput in interface Byte2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(byte key,
double value)
Byte2DoubleMapputIfAbsent in interface Byte2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(byte key,
double value)
Byte2DoubleMapaddTo in interface Byte2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(byte key,
double value)
Byte2DoubleMapByte2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Byte2DoubleMapkey - that should be subtract fromvalue - that should be subtractpublic ByteComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Byte,java.lang.Double>comparator in interface Byte2DoubleSortedMappublic boolean containsKey(byte key)
Byte2DoubleMapcontainsKey in interface Byte2DoubleMapcontainsKey in class AbstractByte2DoubleMapkey - element that is searched forpublic double get(byte key)
Byte2DoubleMapget in interface Byte2DoubleMapkey - the key that is searched forpublic double getOrDefault(byte key,
double defaultValue)
Byte2DoubleMapgetOrDefault in interface Byte2DoubleMapgetOrDefault in class AbstractByte2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte firstByteKey()
Byte2DoubleSortedMapfirstByteKey in interface Byte2DoubleSortedMappublic byte pollFirstByteKey()
Byte2DoubleSortedMappollFirstByteKey in interface Byte2DoubleSortedMappublic byte lastByteKey()
Byte2DoubleSortedMaplastByteKey in interface Byte2DoubleSortedMappublic byte pollLastByteKey()
Byte2DoubleSortedMappollLastByteKey in interface Byte2DoubleSortedMappublic Byte2DoubleMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>firstEntry in interface Byte2DoubleNavigableMappublic Byte2DoubleMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>lastEntry in interface Byte2DoubleNavigableMappublic Byte2DoubleMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>pollFirstEntry in interface Byte2DoubleNavigableMappublic Byte2DoubleMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>pollLastEntry in interface Byte2DoubleNavigableMappublic double firstDoubleValue()
Byte2DoubleSortedMapfirstDoubleValue in interface Byte2DoubleSortedMappublic double lastDoubleValue()
Byte2DoubleSortedMaplastDoubleValue in interface Byte2DoubleSortedMappublic double remove(byte key)
Byte2DoubleMapremove in interface Byte2DoubleMapkey - the element that should be removedpublic double removeOrDefault(byte key,
double defaultValue)
Byte2DoubleMapremoveOrDefault in interface Byte2DoubleMapkey - 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,
double value)
Byte2DoubleMapremove in interface Byte2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(byte key,
double oldValue,
double newValue)
Byte2DoubleMapreplace in interface Byte2DoubleMapreplace in class AbstractByte2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(byte key,
double value)
Byte2DoubleMapreplace in interface Byte2DoubleMapreplace in class AbstractByte2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public double computeDouble(byte key,
ByteDoubleUnaryOperator mappingFunction)
Byte2DoubleMapcomputeDouble in interface Byte2DoubleMapcomputeDouble in class AbstractByte2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(byte key,
Byte2DoubleFunction mappingFunction)
Byte2DoubleMapcomputeDoubleIfAbsent in interface Byte2DoubleMapcomputeDoubleIfAbsent in class AbstractByte2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double supplyDoubleIfAbsent(byte key,
DoubleSupplier valueProvider)
Byte2DoubleMapsupplyDoubleIfAbsent in interface Byte2DoubleMapsupplyDoubleIfAbsent in class AbstractByte2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double computeDoubleIfPresent(byte key,
ByteDoubleUnaryOperator mappingFunction)
Byte2DoubleMapcomputeDoubleIfPresent in interface Byte2DoubleMapcomputeDoubleIfPresent in class AbstractByte2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(byte key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Byte2DoubleMapmergeDouble in interface Byte2DoubleMapmergeDouble in class AbstractByte2DoubleMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllDouble(Byte2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Byte2DoubleMapmergeAllDouble in interface Byte2DoubleMapmergeAllDouble in class AbstractByte2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ByteDoubleConsumer action)
Byte2DoubleMapforEach in interface Byte2DoubleMapforEach in class AbstractByte2DoubleMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Byte,java.lang.Double>size in class java.util.AbstractMap<java.lang.Byte,java.lang.Double>public void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Double>public Byte2DoubleAVLTreeMap copy()
Byte2DoubleMapcopy in interface Byte2DoubleMapcopy in interface Byte2DoubleNavigableMapcopy in interface Byte2DoubleSortedMapcopy in class AbstractByte2DoubleMappublic ByteNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Double>keySet in interface java.util.SortedMap<java.lang.Byte,java.lang.Double>keySet in interface Byte2DoubleMapkeySet in interface Byte2DoubleNavigableMapkeySet in interface Byte2DoubleSortedMapkeySet in class AbstractByte2DoubleMappublic ObjectSet<Byte2DoubleMap.Entry> byte2DoubleEntrySet()
Byte2DoubleMapbyte2DoubleEntrySet in interface Byte2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Double>values in interface java.util.SortedMap<java.lang.Byte,java.lang.Double>values in interface Byte2DoubleMapvalues in interface Byte2DoubleSortedMapvalues in class AbstractByte2DoubleMappublic ByteNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>navigableKeySet in interface Byte2DoubleNavigableMappublic Byte2DoubleNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>descendingMap in interface Byte2DoubleNavigableMappublic ByteNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Byte,java.lang.Double>descendingKeySet in interface Byte2DoubleNavigableMappublic Byte2DoubleNavigableMap subMap(byte fromKey, boolean fromInclusive, byte toKey, boolean toInclusive)
Byte2DoubleNavigableMapsubMap in interface Byte2DoubleNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Byte2DoubleNavigableMap headMap(byte toKey, boolean inclusive)
Byte2DoubleNavigableMapheadMap in interface Byte2DoubleNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Byte2DoubleNavigableMap tailMap(byte fromKey, boolean inclusive)
Byte2DoubleNavigableMaptailMap in interface Byte2DoubleNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic byte lowerKey(byte e)
Byte2DoubleNavigableMaplowerKey in interface Byte2DoubleNavigableMape - that should be compared with.public byte floorKey(byte e)
Byte2DoubleNavigableMapfloorKey in interface Byte2DoubleNavigableMape - that should be compared with.public byte higherKey(byte e)
Byte2DoubleNavigableMaphigherKey in interface Byte2DoubleNavigableMape - that should be compared with.public byte ceilingKey(byte e)
Byte2DoubleNavigableMapceilingKey in interface Byte2DoubleNavigableMape - that should be compared with.public Byte2DoubleMap.Entry lowerEntry(byte key)
Byte2DoubleNavigableMaplowerEntry in interface Byte2DoubleNavigableMapkey - that should be compared with.public Byte2DoubleMap.Entry higherEntry(byte key)
Byte2DoubleNavigableMaphigherEntry in interface Byte2DoubleNavigableMapkey - that should be compared with.public Byte2DoubleMap.Entry floorEntry(byte key)
Byte2DoubleNavigableMapfloorEntry in interface Byte2DoubleNavigableMapkey - that should be compared with.public Byte2DoubleMap.Entry ceilingEntry(byte key)
Byte2DoubleNavigableMapceilingEntry in interface Byte2DoubleNavigableMapkey - that should be compared with.