public class Int2ShortAVLTreeMap extends AbstractInt2ShortMap implements Int2ShortNavigableMap
AbstractInt2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2ShortSortedMap.FastSortedSetInt2ShortMap.BuilderCache, Int2ShortMap.Entry, Int2ShortMap.FastEntrySet, Int2ShortMap.MapBuilder| Constructor and Description |
|---|
Int2ShortAVLTreeMap()
Default Constructor
|
Int2ShortAVLTreeMap(int[] keys,
short[] values)
Helper constructor that allow to create a map from unboxed values
|
Int2ShortAVLTreeMap(int[] keys,
short[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Int2ShortAVLTreeMap(Int2ShortMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Int2ShortAVLTreeMap(Int2ShortMap map,
IntComparator 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.
|
Int2ShortAVLTreeMap(IntComparator comp)
Constructor that allows to define the sorter
|
Int2ShortAVLTreeMap(java.lang.Integer[] keys,
java.lang.Short[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Int2ShortAVLTreeMap(java.lang.Integer[] keys,
java.lang.Short[] values,
IntComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Int2ShortAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Int2ShortAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> map,
IntComparator 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 |
|---|---|
short |
addTo(int key,
short value)
A Helper method to add a primitives together.
|
Int2ShortMap.Entry |
ceilingEntry(int key)
A Type Specific ceilingEntry method to reduce boxing/unboxing.
|
int |
ceilingKey(int e)
A Type Specific ceilingKey method to reduce boxing/unboxing.
|
void |
clear() |
IntComparator |
comparator() |
short |
computeShort(int key,
IntShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
Int2ShortAVLTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
IntNavigableSet |
descendingKeySet() |
Int2ShortNavigableMap |
descendingMap() |
Int2ShortMap.Entry |
firstEntry() |
int |
firstIntKey()
A method to get the first Key of a Map.
|
short |
firstShortValue()
A method to get the first Value of a Map.
|
Int2ShortMap.Entry |
floorEntry(int key)
A Type Specific floorEntry method to reduce boxing/unboxing.
|
int |
floorKey(int e)
A Type Specific floorKey method to reduce boxing/unboxing.
|
void |
forEach(IntShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
short |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getDefaultMaxValue()
A Helper method to get the max value for SubMaps.
|
int |
getDefaultMinValue()
A Helper method to get the min value for SubMaps.
|
short |
getOrDefault(int key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Int2ShortNavigableMap |
headMap(int toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Int2ShortMap.Entry |
higherEntry(int key)
A Type Specific higherEntry method to reduce boxing/unboxing.
|
int |
higherKey(int e)
A Type Specific higherKey method to reduce boxing/unboxing.
|
ObjectSet<Int2ShortMap.Entry> |
int2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntNavigableSet |
keySet() |
Int2ShortMap.Entry |
lastEntry() |
int |
lastIntKey()
A method to get the last Key of a Map.
|
short |
lastShortValue()
A method to get the last Value of a Map.
|
Int2ShortMap.Entry |
lowerEntry(int key)
A Type Specific lowerEntry method to reduce boxing/unboxing.
|
int |
lowerKey(int e)
A Type Specific lowerKey method to reduce boxing/unboxing.
|
void |
mergeAllShort(Int2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
IntNavigableSet |
navigableKeySet() |
Int2ShortMap.Entry |
pollFirstEntry() |
int |
pollFirstIntKey()
A method to get and remove the first Key of a Map.
|
Int2ShortMap.Entry |
pollLastEntry() |
int |
pollLastIntKey()
A method to get and remove the last Key of a Map.
|
short |
put(int key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(int key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
short |
removeOrDefault(int key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
short |
replace(int key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
void |
setDefaultMaxValue(int value)
A Helper method to set the max value for SubMaps.
|
void |
setDefaultMinValue(int value)
A Helper method to set the min value for SubMaps.
|
int |
size() |
short |
subFrom(int key,
short value)
A Helper method to subtract from primitive from each other.
|
Int2ShortNavigableMap |
subMap(int fromKey,
boolean fromInclusive,
int toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
short |
supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Int2ShortNavigableMap |
tailMap(int fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
ShortCollection |
values() |
addToAll, containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceShorts, replaceShorts, 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, replaceShorts, replaceShorts, setDefaultReturnValuepublic Int2ShortAVLTreeMap()
public Int2ShortAVLTreeMap(IntComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Int2ShortAVLTreeMap(java.lang.Integer[] keys,
java.lang.Short[] 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 Int2ShortAVLTreeMap(java.lang.Integer[] keys,
java.lang.Short[] values,
IntComparator 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 Int2ShortAVLTreeMap(int[] keys,
short[] 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 Int2ShortAVLTreeMap(int[] keys,
short[] values,
IntComparator 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 Int2ShortAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> map)
map - the values that should be present in the mappublic Int2ShortAVLTreeMap(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> map,
IntComparator comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Int2ShortAVLTreeMap(Int2ShortMap map)
map - the values that should be present in the mappublic Int2ShortAVLTreeMap(Int2ShortMap map, IntComparator 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(int value)
Int2ShortNavigableMapsetDefaultMaxValue in interface Int2ShortNavigableMapvalue - the new max valuepublic int getDefaultMaxValue()
Int2ShortNavigableMapgetDefaultMaxValue in interface Int2ShortNavigableMappublic void setDefaultMinValue(int value)
Int2ShortNavigableMapsetDefaultMinValue in interface Int2ShortNavigableMapvalue - the new min valuepublic int getDefaultMinValue()
Int2ShortNavigableMapgetDefaultMinValue in interface Int2ShortNavigableMappublic short put(int key,
short value)
Int2ShortMapput in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(int key,
short value)
Int2ShortMapputIfAbsent in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(int key,
short value)
Int2ShortMapaddTo in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(int key,
short value)
Int2ShortMapInt2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2ShortMapkey - that should be subtract fromvalue - that should be subtractpublic IntComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Integer,java.lang.Short>comparator in interface Int2ShortSortedMappublic boolean containsKey(int key)
Int2ShortMapcontainsKey in interface Int2ShortMapcontainsKey in class AbstractInt2ShortMapkey - element that is searched forpublic short get(int key)
Int2ShortMapget in interface Int2ShortFunctionget in interface Int2ShortMapkey - the key that is searched forpublic short getOrDefault(int key,
short defaultValue)
Int2ShortMapgetOrDefault in interface Int2ShortMapgetOrDefault in class AbstractInt2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int firstIntKey()
Int2ShortSortedMapfirstIntKey in interface Int2ShortSortedMappublic int pollFirstIntKey()
Int2ShortSortedMappollFirstIntKey in interface Int2ShortSortedMappublic int lastIntKey()
Int2ShortSortedMaplastIntKey in interface Int2ShortSortedMappublic int pollLastIntKey()
Int2ShortSortedMappollLastIntKey in interface Int2ShortSortedMappublic Int2ShortMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>firstEntry in interface Int2ShortNavigableMappublic Int2ShortMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>lastEntry in interface Int2ShortNavigableMappublic Int2ShortMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>pollFirstEntry in interface Int2ShortNavigableMappublic Int2ShortMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>pollLastEntry in interface Int2ShortNavigableMappublic short firstShortValue()
Int2ShortSortedMapfirstShortValue in interface Int2ShortSortedMappublic short lastShortValue()
Int2ShortSortedMaplastShortValue in interface Int2ShortSortedMappublic short remove(int key)
Int2ShortMapremove in interface Int2ShortMapkey - the element that should be removedpublic short removeOrDefault(int key,
short defaultValue)
Int2ShortMapremoveOrDefault in interface Int2ShortMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
short value)
Int2ShortMapremove in interface Int2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(int key,
short oldValue,
short newValue)
Int2ShortMapreplace in interface Int2ShortMapreplace in class AbstractInt2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(int key,
short value)
Int2ShortMapreplace in interface Int2ShortMapreplace in class AbstractInt2ShortMapkey - the element that should be searched forvalue - the value to replace with.public short computeShort(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShort in interface Int2ShortMapcomputeShort in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
Int2ShortMapcomputeShortIfAbsent in interface Int2ShortMapcomputeShortIfAbsent in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
Int2ShortMapsupplyShortIfAbsent in interface Int2ShortMapsupplyShortIfAbsent in class AbstractInt2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShortIfPresent in interface Int2ShortMapcomputeShortIfPresent in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeShort in interface Int2ShortMapmergeShort in class AbstractInt2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Int2ShortMap m, ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeAllShort in interface Int2ShortMapmergeAllShort in class AbstractInt2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(IntShortConsumer action)
Int2ShortMapforEach in interface Int2ShortMapforEach in class AbstractInt2ShortMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Integer,java.lang.Short>size in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public Int2ShortAVLTreeMap copy()
Int2ShortMapcopy in interface Int2ShortMapcopy in interface Int2ShortNavigableMapcopy in interface Int2ShortSortedMapcopy in class AbstractInt2ShortMappublic IntNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Short>keySet in interface java.util.SortedMap<java.lang.Integer,java.lang.Short>keySet in interface Int2ShortMapkeySet in interface Int2ShortNavigableMapkeySet in interface Int2ShortSortedMapkeySet in class AbstractInt2ShortMappublic ObjectSet<Int2ShortMap.Entry> int2ShortEntrySet()
Int2ShortMapint2ShortEntrySet in interface Int2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Short>values in interface java.util.SortedMap<java.lang.Integer,java.lang.Short>values in interface Int2ShortMapvalues in interface Int2ShortSortedMapvalues in class AbstractInt2ShortMappublic IntNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>navigableKeySet in interface Int2ShortNavigableMappublic Int2ShortNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>descendingMap in interface Int2ShortNavigableMappublic IntNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Integer,java.lang.Short>descendingKeySet in interface Int2ShortNavigableMappublic Int2ShortNavigableMap subMap(int fromKey, boolean fromInclusive, int toKey, boolean toInclusive)
Int2ShortNavigableMapsubMap in interface Int2ShortNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Int2ShortNavigableMap headMap(int toKey, boolean inclusive)
Int2ShortNavigableMapheadMap in interface Int2ShortNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Int2ShortNavigableMap tailMap(int fromKey, boolean inclusive)
Int2ShortNavigableMaptailMap in interface Int2ShortNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic int lowerKey(int e)
Int2ShortNavigableMaplowerKey in interface Int2ShortNavigableMape - that should be compared with.public int floorKey(int e)
Int2ShortNavigableMapfloorKey in interface Int2ShortNavigableMape - that should be compared with.public int higherKey(int e)
Int2ShortNavigableMaphigherKey in interface Int2ShortNavigableMape - that should be compared with.public int ceilingKey(int e)
Int2ShortNavigableMapceilingKey in interface Int2ShortNavigableMape - that should be compared with.public Int2ShortMap.Entry lowerEntry(int key)
Int2ShortNavigableMaplowerEntry in interface Int2ShortNavigableMapkey - that should be compared with.public Int2ShortMap.Entry higherEntry(int key)
Int2ShortNavigableMaphigherEntry in interface Int2ShortNavigableMapkey - that should be compared with.public Int2ShortMap.Entry floorEntry(int key)
Int2ShortNavigableMapfloorEntry in interface Int2ShortNavigableMapkey - that should be compared with.public Int2ShortMap.Entry ceilingEntry(int key)
Int2ShortNavigableMapceilingEntry in interface Int2ShortNavigableMapkey - that should be compared with.