public class Long2DoubleAVLTreeMap extends AbstractLong2DoubleMap implements Long2DoubleNavigableMap
AbstractLong2DoubleMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2DoubleSortedMap.FastSortedSetLong2DoubleMap.BuilderCache, Long2DoubleMap.Entry, Long2DoubleMap.FastEntrySet, Long2DoubleMap.MapBuilder| Constructor and Description |
|---|
Long2DoubleAVLTreeMap()
Default Constructor
|
Long2DoubleAVLTreeMap(long[] keys,
double[] values)
Helper constructor that allow to create a map from unboxed values
|
Long2DoubleAVLTreeMap(java.lang.Long[] keys,
java.lang.Double[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2DoubleAVLTreeMap(long[] keys,
double[] values,
LongComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Long2DoubleAVLTreeMap(java.lang.Long[] keys,
java.lang.Double[] values,
LongComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Long2DoubleAVLTreeMap(Long2DoubleMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2DoubleAVLTreeMap(Long2DoubleMap map,
LongComparator 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.
|
Long2DoubleAVLTreeMap(LongComparator comp)
Constructor that allows to define the sorter
|
Long2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Long2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> map,
LongComparator 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(long key,
double value)
A Helper method to add a primitives together.
|
Long2DoubleMap.Entry |
ceilingEntry(long key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
long |
ceilingKey(long e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
LongComparator |
comparator() |
double |
computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
double |
computeDoubleIfPresent(long key,
LongDoubleUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
Long2DoubleAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
LongNavigableSet |
descendingKeySet() |
Long2DoubleNavigableMap |
descendingMap() |
double |
firstDoubleValue()
A method to get the first Value of a Map.
|
Long2DoubleMap.Entry |
firstEntry() |
long |
firstLongKey()
A method to get the first Key of a Map.
|
Long2DoubleMap.Entry |
floorEntry(long key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
long |
floorKey(long e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(LongDoubleConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
double |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
long |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
double |
getOrDefault(long key,
double defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Long2DoubleNavigableMap |
headMap(long toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Long2DoubleMap.Entry |
higherEntry(long key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
long |
higherKey(long e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
LongNavigableSet |
keySet() |
double |
lastDoubleValue()
A method to get the last Value of a Map.
|
Long2DoubleMap.Entry |
lastEntry() |
long |
lastLongKey()
A method to get the last Key of a Map.
|
ObjectSet<Long2DoubleMap.Entry> |
long2DoubleEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Long2DoubleMap.Entry |
lowerEntry(long key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
long |
lowerKey(long e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllDouble(Long2DoubleMap m,
DoubleDoubleUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
double |
mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
LongNavigableSet |
navigableKeySet() |
Long2DoubleMap.Entry |
pollFirstEntry() |
long |
pollFirstLongKey()
A method to get and remove the first Key of a Map.
|
Long2DoubleMap.Entry |
pollLastEntry() |
long |
pollLastLongKey()
A method to get and remove the last Key of a Map.
|
double |
put(long key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
putIfAbsent(long key,
double value)
Type Specific method to reduce boxing/unboxing of values
|
double |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
double value)
Type Specific remove function to reduce boxing/unboxing
|
double |
removeOrDefault(long key,
double defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
double |
replace(long key,
double value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(long key,
double oldValue,
double newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(long value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(long value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
double |
subFrom(long key,
double value)
A Helper method to subtract from primitive from each other.
|
Long2DoubleNavigableMap |
subMap(long fromKey,
boolean fromInclusive,
long toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
double |
supplyDoubleIfAbsent(long key,
DoubleSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Long2DoubleNavigableMap |
tailMap(long 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 Long2DoubleAVLTreeMap()
public Long2DoubleAVLTreeMap(LongComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Long2DoubleAVLTreeMap(java.lang.Long[] 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 Long2DoubleAVLTreeMap(java.lang.Long[] keys,
java.lang.Double[] values,
LongComparator 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 Long2DoubleAVLTreeMap(long[] 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 Long2DoubleAVLTreeMap(long[] keys,
double[] values,
LongComparator 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 Long2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> map)
map - the values that should be present in the mappublic Long2DoubleAVLTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Double> map,
LongComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Long2DoubleAVLTreeMap(Long2DoubleMap map)
map - the values that should be present in the mappublic Long2DoubleAVLTreeMap(Long2DoubleMap map, LongComparator 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(long value)
Long2DoubleNavigableMapsetDefaultMaxValue in interface Long2DoubleNavigableMapvalue - the new max valuepublic long getDefaultMaxValue()
Long2DoubleNavigableMapgetDefaultMaxValue in interface Long2DoubleNavigableMappublic void setDefaultMinValue(long value)
Long2DoubleNavigableMapsetDefaultMinValue in interface Long2DoubleNavigableMapvalue - the new min valuepublic long getDefaultMinValue()
Long2DoubleNavigableMapgetDefaultMinValue in interface Long2DoubleNavigableMappublic double put(long key,
double value)
Long2DoubleMapput in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public double putIfAbsent(long key,
double value)
Long2DoubleMapputIfAbsent in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public double addTo(long key,
double value)
Long2DoubleMapaddTo in interface Long2DoubleMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic double subFrom(long key,
double value)
Long2DoubleMapLong2DoubleMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Long2DoubleMapkey - that should be subtract fromvalue - that should be subtractpublic LongComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Long,java.lang.Double>comparator in interface Long2DoubleSortedMappublic boolean containsKey(long key)
Long2DoubleMapcontainsKey in interface Long2DoubleMapcontainsKey in class AbstractLong2DoubleMapkey - element that is searched forpublic double get(long key)
Long2DoubleMapget in interface Long2DoubleMapkey - the key that is searched forpublic double getOrDefault(long key,
double defaultValue)
Long2DoubleMapgetOrDefault in interface Long2DoubleMapgetOrDefault in class AbstractLong2DoubleMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long firstLongKey()
Long2DoubleSortedMapfirstLongKey in interface Long2DoubleSortedMappublic long pollFirstLongKey()
Long2DoubleSortedMappollFirstLongKey in interface Long2DoubleSortedMappublic long lastLongKey()
Long2DoubleSortedMaplastLongKey in interface Long2DoubleSortedMappublic long pollLastLongKey()
Long2DoubleSortedMappollLastLongKey in interface Long2DoubleSortedMappublic Long2DoubleMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>firstEntry in interface Long2DoubleNavigableMappublic Long2DoubleMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>lastEntry in interface Long2DoubleNavigableMappublic Long2DoubleMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>pollFirstEntry in interface Long2DoubleNavigableMappublic Long2DoubleMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>pollLastEntry in interface Long2DoubleNavigableMappublic double firstDoubleValue()
Long2DoubleSortedMapfirstDoubleValue in interface Long2DoubleSortedMappublic double lastDoubleValue()
Long2DoubleSortedMaplastDoubleValue in interface Long2DoubleSortedMappublic double remove(long key)
Long2DoubleMapremove in interface Long2DoubleMapkey - the element that should be removedpublic double removeOrDefault(long key,
double defaultValue)
Long2DoubleMapremoveOrDefault in interface Long2DoubleMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
double value)
Long2DoubleMapremove in interface Long2DoubleMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
double oldValue,
double newValue)
Long2DoubleMapreplace in interface Long2DoubleMapreplace in class AbstractLong2DoubleMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public double replace(long key,
double value)
Long2DoubleMapreplace in interface Long2DoubleMapreplace in class AbstractLong2DoubleMapkey - the element that should be searched forvalue - the value to replace with.public double computeDouble(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDouble in interface Long2DoubleMapcomputeDouble in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic double computeDoubleIfAbsent(long key,
Long2DoubleFunction mappingFunction)
Long2DoubleMapcomputeDoubleIfAbsent in interface Long2DoubleMapcomputeDoubleIfAbsent in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic double supplyDoubleIfAbsent(long key,
DoubleSupplier valueProvider)
Long2DoubleMapsupplyDoubleIfAbsent in interface Long2DoubleMapsupplyDoubleIfAbsent in class AbstractLong2DoubleMapkey - the key that should be computedvalueProvider - the value if not presentpublic double computeDoubleIfPresent(long key,
LongDoubleUnaryOperator mappingFunction)
Long2DoubleMapcomputeDoubleIfPresent in interface Long2DoubleMapcomputeDoubleIfPresent in class AbstractLong2DoubleMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic double mergeDouble(long key,
double value,
DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeDouble in interface Long2DoubleMapmergeDouble in class AbstractLong2DoubleMapkey - 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(Long2DoubleMap m, DoubleDoubleUnaryOperator mappingFunction)
Long2DoubleMapmergeAllDouble in interface Long2DoubleMapmergeAllDouble in class AbstractLong2DoubleMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(LongDoubleConsumer action)
Long2DoubleMapforEach in interface Long2DoubleMapforEach in class AbstractLong2DoubleMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Double>size in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Double>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Double>public Long2DoubleAVLTreeMap copy()
Long2DoubleMapcopy in interface Long2DoubleMapcopy in interface Long2DoubleNavigableMapcopy in interface Long2DoubleSortedMapcopy in class AbstractLong2DoubleMappublic LongNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Double>keySet in interface java.util.SortedMap<java.lang.Long,java.lang.Double>keySet in interface Long2DoubleMapkeySet in interface Long2DoubleNavigableMapkeySet in interface Long2DoubleSortedMapkeySet in class AbstractLong2DoubleMappublic ObjectSet<Long2DoubleMap.Entry> long2DoubleEntrySet()
Long2DoubleMaplong2DoubleEntrySet in interface Long2DoubleMappublic DoubleCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Double>values in interface java.util.SortedMap<java.lang.Long,java.lang.Double>values in interface Long2DoubleMapvalues in interface Long2DoubleSortedMapvalues in class AbstractLong2DoubleMappublic LongNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>navigableKeySet in interface Long2DoubleNavigableMappublic Long2DoubleNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>descendingMap in interface Long2DoubleNavigableMappublic LongNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Long,java.lang.Double>descendingKeySet in interface Long2DoubleNavigableMappublic Long2DoubleNavigableMap subMap(long fromKey, boolean fromInclusive, long toKey, boolean toInclusive)
Long2DoubleNavigableMapsubMap in interface Long2DoubleNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Long2DoubleNavigableMap headMap(long toKey, boolean inclusive)
Long2DoubleNavigableMapheadMap in interface Long2DoubleNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Long2DoubleNavigableMap tailMap(long fromKey, boolean inclusive)
Long2DoubleNavigableMaptailMap in interface Long2DoubleNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic long lowerKey(long e)
Long2DoubleNavigableMaplowerKey in interface Long2DoubleNavigableMape - that should be compared with.public long floorKey(long e)
Long2DoubleNavigableMapfloorKey in interface Long2DoubleNavigableMape - that should be compared with.public long higherKey(long e)
Long2DoubleNavigableMaphigherKey in interface Long2DoubleNavigableMape - that should be compared with.public long ceilingKey(long e)
Long2DoubleNavigableMapceilingKey in interface Long2DoubleNavigableMape - that should be compared with.public Long2DoubleMap.Entry lowerEntry(long key)
Long2DoubleNavigableMaplowerEntry in interface Long2DoubleNavigableMapkey - that should be compared with.public Long2DoubleMap.Entry higherEntry(long key)
Long2DoubleNavigableMaphigherEntry in interface Long2DoubleNavigableMapkey - that should be compared with.public Long2DoubleMap.Entry floorEntry(long key)
Long2DoubleNavigableMapfloorEntry in interface Long2DoubleNavigableMapkey - that should be compared with.public Long2DoubleMap.Entry ceilingEntry(long key)
Long2DoubleNavigableMapceilingEntry in interface Long2DoubleNavigableMapkey - that should be compared with.