public class Short2FloatRBTreeMap extends AbstractShort2FloatMap implements Short2FloatNavigableMap
AbstractShort2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2FloatSortedMap.FastSortedSetShort2FloatMap.BuilderCache, Short2FloatMap.Entry, Short2FloatMap.FastEntrySet, Short2FloatMap.MapBuilder| Constructor and Description |
|---|
Short2FloatRBTreeMap()
Default Constructor
|
Short2FloatRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Float> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2FloatRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Float> 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.
|
Short2FloatRBTreeMap(short[] keys,
float[] values)
Helper constructor that allow to create a map from unboxed values
|
Short2FloatRBTreeMap(java.lang.Short[] keys,
java.lang.Float[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2FloatRBTreeMap(short[] keys,
float[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Short2FloatRBTreeMap(java.lang.Short[] keys,
java.lang.Float[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Short2FloatRBTreeMap(Short2FloatMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2FloatRBTreeMap(Short2FloatMap 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.
|
Short2FloatRBTreeMap(ShortComparator comp)
Constructor that allows to define the sorter
|
| Modifier and Type | Method and Description |
|---|---|
float |
addTo(short key,
float value)
A Helper method to add a primitives together.
|
Short2FloatMap.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() |
float |
computeFloat(short key,
ShortFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(short key,
Short2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(short key,
ShortFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
Short2FloatRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ShortNavigableSet |
descendingKeySet() |
Short2FloatNavigableMap |
descendingMap() |
Short2FloatMap.Entry |
firstEntry() |
float |
firstFloatValue()
A method to get the first Value of a Map.
|
short |
firstShortKey()
A method to get the first Key of a Map.
|
Short2FloatMap.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.
|
void |
forEach(ShortFloatConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
get(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.
|
float |
getOrDefault(short key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Short2FloatNavigableMap |
headMap(short toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Short2FloatMap.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.
|
ShortNavigableSet |
keySet() |
Short2FloatMap.Entry |
lastEntry() |
float |
lastFloatValue()
A method to get the last Value of a Map.
|
short |
lastShortKey()
A method to get the last Key of a Map.
|
Short2FloatMap.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 |
mergeAllFloat(Short2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(short key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ShortNavigableSet |
navigableKeySet() |
Short2FloatMap.Entry |
pollFirstEntry() |
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
Short2FloatMap.Entry |
pollLastEntry() |
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
float |
put(short key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(short key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(short key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
float |
replace(short key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(short key,
float oldValue,
float 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<Short2FloatMap.Entry> |
short2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
float |
subFrom(short key,
float value)
A Helper method to subtract from primitive from each other.
|
Short2FloatNavigableMap |
subMap(short fromKey,
boolean fromInclusive,
short toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
float |
supplyFloatIfAbsent(short key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Short2FloatNavigableMap |
tailMap(short 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 Short2FloatRBTreeMap()
public Short2FloatRBTreeMap(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Short2FloatRBTreeMap(java.lang.Short[] 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 Short2FloatRBTreeMap(java.lang.Short[] keys,
java.lang.Float[] 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 Short2FloatRBTreeMap(short[] 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 Short2FloatRBTreeMap(short[] keys,
float[] 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 Short2FloatRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Float> map)
map - the values that should be present in the mappublic Short2FloatRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Float> 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 Short2FloatRBTreeMap(Short2FloatMap map)
map - the values that should be present in the mappublic Short2FloatRBTreeMap(Short2FloatMap 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)
Short2FloatNavigableMapsetDefaultMaxValue in interface Short2FloatNavigableMapvalue - the new max valuepublic short getDefaultMaxValue()
Short2FloatNavigableMapgetDefaultMaxValue in interface Short2FloatNavigableMappublic void setDefaultMinValue(short value)
Short2FloatNavigableMapsetDefaultMinValue in interface Short2FloatNavigableMapvalue - the new min valuepublic short getDefaultMinValue()
Short2FloatNavigableMapgetDefaultMinValue in interface Short2FloatNavigableMappublic float put(short key,
float value)
Short2FloatMapput in interface Short2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(short key,
float value)
Short2FloatMapputIfAbsent in interface Short2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(short key,
float value)
Short2FloatMapaddTo in interface Short2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(short key,
float value)
Short2FloatMapShort2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Short2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic ShortComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Short,java.lang.Float>comparator in interface Short2FloatSortedMappublic boolean containsKey(short key)
Short2FloatMapcontainsKey in interface Short2FloatMapcontainsKey in class AbstractShort2FloatMapkey - element that is searched forpublic float get(short key)
Short2FloatMapget in interface Short2FloatFunctionget in interface Short2FloatMapkey - the key that is searched forpublic float getOrDefault(short key,
float defaultValue)
Short2FloatMapgetOrDefault in interface Short2FloatMapgetOrDefault in class AbstractShort2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short firstShortKey()
Short2FloatSortedMapfirstShortKey in interface Short2FloatSortedMappublic short pollFirstShortKey()
Short2FloatSortedMappollFirstShortKey in interface Short2FloatSortedMappublic short lastShortKey()
Short2FloatSortedMaplastShortKey in interface Short2FloatSortedMappublic short pollLastShortKey()
Short2FloatSortedMappollLastShortKey in interface Short2FloatSortedMappublic Short2FloatMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>firstEntry in interface Short2FloatNavigableMappublic Short2FloatMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>lastEntry in interface Short2FloatNavigableMappublic Short2FloatMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>pollFirstEntry in interface Short2FloatNavigableMappublic Short2FloatMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>pollLastEntry in interface Short2FloatNavigableMappublic float firstFloatValue()
Short2FloatSortedMapfirstFloatValue in interface Short2FloatSortedMappublic float lastFloatValue()
Short2FloatSortedMaplastFloatValue in interface Short2FloatSortedMappublic float remove(short key)
Short2FloatMapremove in interface Short2FloatMapkey - the element that should be removedpublic float removeOrDefault(short key,
float defaultValue)
Short2FloatMapremoveOrDefault in interface Short2FloatMapkey - 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,
float value)
Short2FloatMapremove in interface Short2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
float oldValue,
float newValue)
Short2FloatMapreplace in interface Short2FloatMapreplace in class AbstractShort2FloatMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(short key,
float value)
Short2FloatMapreplace in interface Short2FloatMapreplace in class AbstractShort2FloatMapkey - the element that should be searched forvalue - the value to replace with.public float computeFloat(short key,
ShortFloatUnaryOperator mappingFunction)
Short2FloatMapcomputeFloat in interface Short2FloatMapcomputeFloat in class AbstractShort2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(short key,
Short2FloatFunction mappingFunction)
Short2FloatMapcomputeFloatIfAbsent in interface Short2FloatMapcomputeFloatIfAbsent in class AbstractShort2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float supplyFloatIfAbsent(short key,
FloatSupplier valueProvider)
Short2FloatMapsupplyFloatIfAbsent in interface Short2FloatMapsupplyFloatIfAbsent in class AbstractShort2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float computeFloatIfPresent(short key,
ShortFloatUnaryOperator mappingFunction)
Short2FloatMapcomputeFloatIfPresent in interface Short2FloatMapcomputeFloatIfPresent in class AbstractShort2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(short key,
float value,
FloatFloatUnaryOperator mappingFunction)
Short2FloatMapmergeFloat in interface Short2FloatMapmergeFloat in class AbstractShort2FloatMapkey - 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(Short2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Short2FloatMapmergeAllFloat in interface Short2FloatMapmergeAllFloat in class AbstractShort2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ShortFloatConsumer action)
Short2FloatMapforEach in interface Short2FloatMapforEach in class AbstractShort2FloatMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Float>size in class java.util.AbstractMap<java.lang.Short,java.lang.Float>public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Float>public Short2FloatRBTreeMap copy()
Short2FloatMapcopy in interface Short2FloatMapcopy in interface Short2FloatNavigableMapcopy in interface Short2FloatSortedMapcopy in class AbstractShort2FloatMappublic ShortNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Float>keySet in interface java.util.SortedMap<java.lang.Short,java.lang.Float>keySet in interface Short2FloatMapkeySet in interface Short2FloatNavigableMapkeySet in interface Short2FloatSortedMapkeySet in class AbstractShort2FloatMappublic ObjectSet<Short2FloatMap.Entry> short2FloatEntrySet()
Short2FloatMapshort2FloatEntrySet in interface Short2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Float>values in interface java.util.SortedMap<java.lang.Short,java.lang.Float>values in interface Short2FloatMapvalues in interface Short2FloatSortedMapvalues in class AbstractShort2FloatMappublic ShortNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>navigableKeySet in interface Short2FloatNavigableMappublic Short2FloatNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>descendingMap in interface Short2FloatNavigableMappublic ShortNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Float>descendingKeySet in interface Short2FloatNavigableMappublic Short2FloatNavigableMap subMap(short fromKey, boolean fromInclusive, short toKey, boolean toInclusive)
Short2FloatNavigableMapsubMap in interface Short2FloatNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Short2FloatNavigableMap headMap(short toKey, boolean inclusive)
Short2FloatNavigableMapheadMap in interface Short2FloatNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Short2FloatNavigableMap tailMap(short fromKey, boolean inclusive)
Short2FloatNavigableMaptailMap in interface Short2FloatNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic short lowerKey(short e)
Short2FloatNavigableMaplowerKey in interface Short2FloatNavigableMape - that should be compared with.public short floorKey(short e)
Short2FloatNavigableMapfloorKey in interface Short2FloatNavigableMape - that should be compared with.public short higherKey(short e)
Short2FloatNavigableMaphigherKey in interface Short2FloatNavigableMape - that should be compared with.public short ceilingKey(short e)
Short2FloatNavigableMapceilingKey in interface Short2FloatNavigableMape - that should be compared with.public Short2FloatMap.Entry lowerEntry(short key)
Short2FloatNavigableMaplowerEntry in interface Short2FloatNavigableMapkey - that should be compared with.public Short2FloatMap.Entry higherEntry(short key)
Short2FloatNavigableMaphigherEntry in interface Short2FloatNavigableMapkey - that should be compared with.public Short2FloatMap.Entry floorEntry(short key)
Short2FloatNavigableMapfloorEntry in interface Short2FloatNavigableMapkey - that should be compared with.public Short2FloatMap.Entry ceilingEntry(short key)
Short2FloatNavigableMapceilingEntry in interface Short2FloatNavigableMapkey - that should be compared with.