public class Long2FloatRBTreeMap extends AbstractLong2FloatMap implements Long2FloatNavigableMap
AbstractLong2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2FloatSortedMap.FastSortedSetLong2FloatMap.BuilderCache, Long2FloatMap.Entry, Long2FloatMap.FastEntrySet, Long2FloatMap.MapBuilder| Constructor and Description |
|---|
Long2FloatRBTreeMap()
Default Constructor
|
Long2FloatRBTreeMap(long[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Long2FloatRBTreeMap(java.lang.Long[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Long2FloatRBTreeMap(long[] keys,
float[] values,
LongComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Long2FloatRBTreeMap(java.lang.Long[] keys,
java.lang.Float[] values,
LongComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Long2FloatRBTreeMap(Long2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Long2FloatRBTreeMap(Long2FloatMap 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.
|
Long2FloatRBTreeMap(LongComparator comp)
Constructor that allows to define the sorter
|
Long2FloatRBTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Long2FloatRBTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Float> 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 |
|---|---|
float |
addTo(long key,
float value)
A Helper method to add a primitives together.
|
Long2FloatMap.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() |
float |
computeFloat(long key,
LongFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(long key,
Long2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(long key,
LongFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
Long2FloatRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
LongNavigableSet |
descendingKeySet() |
Long2FloatNavigableMap |
descendingMap() |
Long2FloatMap.Entry |
firstEntry() |
float |
firstFloatValue()
A method to get the first Value of a Map.
|
long |
firstLongKey()
A method to get the first Key of a Map.
|
Long2FloatMap.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(LongFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
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.
|
float |
getOrDefault(long key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Long2FloatNavigableMap |
headMap(long toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Long2FloatMap.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() |
Long2FloatMap.Entry |
lastEntry() |
float |
lastFloatValue()
A method to get the last Value of a Map.
|
long |
lastLongKey()
A method to get the last Key of a Map.
|
ObjectSet<Long2FloatMap.Entry> |
long2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Long2FloatMap.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 |
mergeAllFloat(Long2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(long key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
LongNavigableSet |
navigableKeySet() |
Long2FloatMap.Entry |
pollFirstEntry() |
long |
pollFirstLongKey()
A method to get and remove the first Key of a Map.
|
Long2FloatMap.Entry |
pollLastEntry() |
long |
pollLastLongKey()
A method to get and remove the last Key of a Map.
|
float |
put(long key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(long key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(long key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(long key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(long key,
float oldValue,
float 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() |
float |
subFrom(long key,
float value)
A Helper method to subtract from primitive from each other.
|
Long2FloatNavigableMap |
subMap(long fromKey,
boolean fromInclusive,
long toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
float |
supplyFloatIfAbsent(long key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Long2FloatNavigableMap |
tailMap(long fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
FloatCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceFloats, replaceFloats, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeyaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, containsValue, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceFloats, replaceFloats, setDefaultReturnValuepublic Long2FloatRBTreeMap()
public Long2FloatRBTreeMap(LongComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Long2FloatRBTreeMap(java.lang.Long[] keys,
java.lang.Float[] 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 Long2FloatRBTreeMap(java.lang.Long[] keys,
java.lang.Float[] 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 Long2FloatRBTreeMap(long[] keys,
float[] 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 Long2FloatRBTreeMap(long[] keys,
float[] 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 Long2FloatRBTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Long2FloatRBTreeMap(java.util.Map<? extends java.lang.Long,? extends java.lang.Float> 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 Long2FloatRBTreeMap(Long2FloatMap map)
map - the values that should be present in the mappublic Long2FloatRBTreeMap(Long2FloatMap 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)
Long2FloatNavigableMapsetDefaultMaxValue in interface Long2FloatNavigableMapvalue - the new max valuepublic long getDefaultMaxValue()
Long2FloatNavigableMapgetDefaultMaxValue in interface Long2FloatNavigableMappublic void setDefaultMinValue(long value)
Long2FloatNavigableMapsetDefaultMinValue in interface Long2FloatNavigableMapvalue - the new min valuepublic long getDefaultMinValue()
Long2FloatNavigableMapgetDefaultMinValue in interface Long2FloatNavigableMappublic float put(long key,
float value)
Long2FloatMapput in interface Long2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(long key,
float value)
Long2FloatMapputIfAbsent in interface Long2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(long key,
float value)
Long2FloatMapaddTo in interface Long2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(long key,
float value)
Long2FloatMapLong2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Long2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic LongComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Long,java.lang.Float>comparator in interface Long2FloatSortedMappublic boolean containsKey(long key)
Long2FloatMapcontainsKey in interface Long2FloatMapcontainsKey in class AbstractLong2FloatMapkey - element that is searched forpublic float get(long key)
Long2FloatMapget in interface Long2FloatFunctionget in interface Long2FloatMapkey - the key that is searched forpublic float getOrDefault(long key,
float defaultValue)
Long2FloatMapgetOrDefault in interface Long2FloatMapgetOrDefault in class AbstractLong2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long firstLongKey()
Long2FloatSortedMapfirstLongKey in interface Long2FloatSortedMappublic long pollFirstLongKey()
Long2FloatSortedMappollFirstLongKey in interface Long2FloatSortedMappublic long lastLongKey()
Long2FloatSortedMaplastLongKey in interface Long2FloatSortedMappublic long pollLastLongKey()
Long2FloatSortedMappollLastLongKey in interface Long2FloatSortedMappublic Long2FloatMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>firstEntry in interface Long2FloatNavigableMappublic Long2FloatMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>lastEntry in interface Long2FloatNavigableMappublic Long2FloatMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>pollFirstEntry in interface Long2FloatNavigableMappublic Long2FloatMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>pollLastEntry in interface Long2FloatNavigableMappublic float firstFloatValue()
Long2FloatSortedMapfirstFloatValue in interface Long2FloatSortedMappublic float lastFloatValue()
Long2FloatSortedMaplastFloatValue in interface Long2FloatSortedMappublic float remove(long key)
Long2FloatMapremove in interface Long2FloatMapkey - the element that should be removedpublic float removeOrDefault(long key,
float defaultValue)
Long2FloatMapremoveOrDefault in interface Long2FloatMapkey - 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,
float value)
Long2FloatMapremove in interface Long2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(long key,
float oldValue,
float newValue)
Long2FloatMapreplace in interface Long2FloatMapreplace in class AbstractLong2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(long key,
float value)
Long2FloatMapreplace in interface Long2FloatMapreplace in class AbstractLong2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(long key,
LongFloatUnaryOperator mappingFunction)
Long2FloatMapcomputeFloat in interface Long2FloatMapcomputeFloat in class AbstractLong2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(long key,
Long2FloatFunction mappingFunction)
Long2FloatMapcomputeFloatIfAbsent in interface Long2FloatMapcomputeFloatIfAbsent in class AbstractLong2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(long key,
FloatSupplier valueProvider)
Long2FloatMapsupplyFloatIfAbsent in interface Long2FloatMapsupplyFloatIfAbsent in class AbstractLong2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(long key,
LongFloatUnaryOperator mappingFunction)
Long2FloatMapcomputeFloatIfPresent in interface Long2FloatMapcomputeFloatIfPresent in class AbstractLong2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(long key,
float value,
FloatFloatUnaryOperator mappingFunction)
Long2FloatMapmergeFloat in interface Long2FloatMapmergeFloat in class AbstractLong2FloatMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllFloat(Long2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Long2FloatMapmergeAllFloat in interface Long2FloatMapmergeAllFloat in class AbstractLong2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(LongFloatConsumer action)
Long2FloatMapforEach in interface Long2FloatMapforEach in class AbstractLong2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Long,java.lang.Float>size in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Long,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Long,java.lang.Float>public Long2FloatRBTreeMap copy()
Long2FloatMapcopy in interface Long2FloatMapcopy in interface Long2FloatNavigableMapcopy in interface Long2FloatSortedMapcopy in class AbstractLong2FloatMappublic LongNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Long,java.lang.Float>keySet in interface Long2FloatMapkeySet in interface Long2FloatNavigableMapkeySet in interface Long2FloatSortedMapkeySet in class AbstractLong2FloatMappublic ObjectSet<Long2FloatMap.Entry> long2FloatEntrySet()
Long2FloatMaplong2FloatEntrySet in interface Long2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Float>values in interface java.util.SortedMap<java.lang.Long,java.lang.Float>values in interface Long2FloatMapvalues in interface Long2FloatSortedMapvalues in class AbstractLong2FloatMappublic LongNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>navigableKeySet in interface Long2FloatNavigableMappublic Long2FloatNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>descendingMap in interface Long2FloatNavigableMappublic LongNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Long,java.lang.Float>descendingKeySet in interface Long2FloatNavigableMappublic Long2FloatNavigableMap subMap(long fromKey, boolean fromInclusive, long toKey, boolean toInclusive)
Long2FloatNavigableMapsubMap in interface Long2FloatNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Long2FloatNavigableMap headMap(long toKey, boolean inclusive)
Long2FloatNavigableMapheadMap in interface Long2FloatNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Long2FloatNavigableMap tailMap(long fromKey, boolean inclusive)
Long2FloatNavigableMaptailMap in interface Long2FloatNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic long lowerKey(long e)
Long2FloatNavigableMaplowerKey in interface Long2FloatNavigableMape - that should be compared with.public long floorKey(long e)
Long2FloatNavigableMapfloorKey in interface Long2FloatNavigableMape - that should be compared with.public long higherKey(long e)
Long2FloatNavigableMaphigherKey in interface Long2FloatNavigableMape - that should be compared with.public long ceilingKey(long e)
Long2FloatNavigableMapceilingKey in interface Long2FloatNavigableMape - that should be compared with.public Long2FloatMap.Entry lowerEntry(long key)
Long2FloatNavigableMaplowerEntry in interface Long2FloatNavigableMapkey - that should be compared with.public Long2FloatMap.Entry higherEntry(long key)
Long2FloatNavigableMaphigherEntry in interface Long2FloatNavigableMapkey - that should be compared with.public Long2FloatMap.Entry floorEntry(long key)
Long2FloatNavigableMapfloorEntry in interface Long2FloatNavigableMapkey - that should be compared with.public Long2FloatMap.Entry ceilingEntry(long key)
Long2FloatNavigableMapceilingEntry in interface Long2FloatNavigableMapkey - that should be compared with.