public class Short2BooleanRBTreeMap extends AbstractShort2BooleanMap implements Short2BooleanNavigableMap
AbstractShort2BooleanMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2BooleanSortedMap.FastSortedSetShort2BooleanMap.BuilderCache, Short2BooleanMap.Entry, Short2BooleanMap.FastEntrySet, Short2BooleanMap.MapBuilder| Constructor and Description |
|---|
Short2BooleanRBTreeMap()
Default Constructor
|
Short2BooleanRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Boolean> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Short2BooleanRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Boolean> 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.
|
Short2BooleanRBTreeMap(short[] keys,
boolean[] values)
Helper constructor that allow to create a map from unboxed values
|
Short2BooleanRBTreeMap(java.lang.Short[] keys,
java.lang.Boolean[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Short2BooleanRBTreeMap(short[] keys,
boolean[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Short2BooleanRBTreeMap(java.lang.Short[] keys,
java.lang.Boolean[] values,
ShortComparator comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
Short2BooleanRBTreeMap(Short2BooleanMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Short2BooleanRBTreeMap(Short2BooleanMap 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.
|
Short2BooleanRBTreeMap(ShortComparator comp)
Constructor that allows to define the sorter
|
| Modifier and Type | Method and Description |
|---|---|
Short2BooleanMap.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() |
boolean |
computeBoolean(short key,
ShortBooleanUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfAbsent(short key,
ShortPredicate mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfPresent(short key,
ShortBooleanUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
Short2BooleanRBTreeMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ShortNavigableSet |
descendingKeySet() |
Short2BooleanNavigableMap |
descendingMap() |
boolean |
firstBooleanValue()
A method to get the first Value of a Map.
|
Short2BooleanMap.Entry |
firstEntry() |
short |
firstShortKey()
A method to get the first Key of a Map.
|
Short2BooleanMap.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(ShortBooleanConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
boolean |
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.
|
boolean |
getOrDefault(short key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Short2BooleanNavigableMap |
headMap(short toKey,
boolean inclusive)
A Type Specific HeadMap method to reduce boxing/unboxing
|
Short2BooleanMap.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() |
boolean |
lastBooleanValue()
A method to get the last Value of a Map.
|
Short2BooleanMap.Entry |
lastEntry() |
short |
lastShortKey()
A method to get the last Key of a Map.
|
Short2BooleanMap.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 |
mergeAllBoolean(Short2BooleanMap m,
BooleanBooleanUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
boolean |
mergeBoolean(short key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ShortNavigableSet |
navigableKeySet() |
Short2BooleanMap.Entry |
pollFirstEntry() |
short |
pollFirstShortKey()
A method to get and remove the first Key of a Map.
|
Short2BooleanMap.Entry |
pollLastEntry() |
short |
pollLastShortKey()
A method to get and remove the last Key of a Map.
|
boolean |
put(short key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
putIfAbsent(short key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
boolean value)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
removeOrDefault(short key,
boolean defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
replace(short key,
boolean value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(short key,
boolean oldValue,
boolean 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<Short2BooleanMap.Entry> |
short2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
Short2BooleanNavigableMap |
subMap(short fromKey,
boolean fromInclusive,
short toKey,
boolean toInclusive)
A Type Specific SubMap method to reduce boxing/unboxing
|
boolean |
supplyBooleanIfAbsent(short key,
BooleanSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
Short2BooleanNavigableMap |
tailMap(short fromKey,
boolean inclusive)
A Type Specific TailMap method to reduce boxing/unboxing
|
BooleanCollection |
values() |
containsValue, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replaceBooleans, replaceBooleans, setDefaultReturnValueceilingEntry, ceilingKey, floorEntry, floorKey, headMap, headMap, headMap, higherEntry, higherKey, lowerEntry, lowerKey, subMap, subMap, subMap, synchronize, synchronize, tailMap, tailMap, tailMap, unmodifiablefirstKey, lastKeybuilder, 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, replaceBooleans, replaceBooleans, setDefaultReturnValue, testalwaysFalse, alwaysTrue, andType, negate, orTypepublic Short2BooleanRBTreeMap()
public Short2BooleanRBTreeMap(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic Short2BooleanRBTreeMap(java.lang.Short[] keys,
java.lang.Boolean[] 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 Short2BooleanRBTreeMap(java.lang.Short[] keys,
java.lang.Boolean[] 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 Short2BooleanRBTreeMap(short[] keys,
boolean[] 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 Short2BooleanRBTreeMap(short[] keys,
boolean[] 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 Short2BooleanRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Boolean> map)
map - the values that should be present in the mappublic Short2BooleanRBTreeMap(java.util.Map<? extends java.lang.Short,? extends java.lang.Boolean> 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 Short2BooleanRBTreeMap(Short2BooleanMap map)
map - the values that should be present in the mappublic Short2BooleanRBTreeMap(Short2BooleanMap 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)
Short2BooleanNavigableMapsetDefaultMaxValue in interface Short2BooleanNavigableMapvalue - the new max valuepublic short getDefaultMaxValue()
Short2BooleanNavigableMapgetDefaultMaxValue in interface Short2BooleanNavigableMappublic void setDefaultMinValue(short value)
Short2BooleanNavigableMapsetDefaultMinValue in interface Short2BooleanNavigableMapvalue - the new min valuepublic short getDefaultMinValue()
Short2BooleanNavigableMapgetDefaultMinValue in interface Short2BooleanNavigableMappublic boolean put(short key,
boolean value)
Short2BooleanMapput in interface Short2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public boolean putIfAbsent(short key,
boolean value)
Short2BooleanMapputIfAbsent in interface Short2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public ShortComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Short,java.lang.Boolean>comparator in interface Short2BooleanSortedMappublic boolean containsKey(short key)
Short2BooleanMapcontainsKey in interface Short2BooleanMapcontainsKey in class AbstractShort2BooleanMapkey - element that is searched forpublic boolean get(short key)
Short2BooleanMapget in interface Short2BooleanMapkey - the key that is searched forpublic boolean getOrDefault(short key,
boolean defaultValue)
Short2BooleanMapgetOrDefault in interface Short2BooleanMapgetOrDefault in class AbstractShort2BooleanMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short firstShortKey()
Short2BooleanSortedMapfirstShortKey in interface Short2BooleanSortedMappublic short pollFirstShortKey()
Short2BooleanSortedMappollFirstShortKey in interface Short2BooleanSortedMappublic short lastShortKey()
Short2BooleanSortedMaplastShortKey in interface Short2BooleanSortedMappublic short pollLastShortKey()
Short2BooleanSortedMappollLastShortKey in interface Short2BooleanSortedMappublic Short2BooleanMap.Entry firstEntry()
firstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>firstEntry in interface Short2BooleanNavigableMappublic Short2BooleanMap.Entry lastEntry()
lastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>lastEntry in interface Short2BooleanNavigableMappublic Short2BooleanMap.Entry pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>pollFirstEntry in interface Short2BooleanNavigableMappublic Short2BooleanMap.Entry pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>pollLastEntry in interface Short2BooleanNavigableMappublic boolean firstBooleanValue()
Short2BooleanSortedMapfirstBooleanValue in interface Short2BooleanSortedMappublic boolean lastBooleanValue()
Short2BooleanSortedMaplastBooleanValue in interface Short2BooleanSortedMappublic boolean remove(short key)
Short2BooleanMapremove in interface Short2BooleanMapkey - the element that should be removedpublic boolean removeOrDefault(short key,
boolean defaultValue)
Short2BooleanMapremoveOrDefault in interface Short2BooleanMapkey - 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,
boolean value)
Short2BooleanMapremove in interface Short2BooleanMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
boolean oldValue,
boolean newValue)
Short2BooleanMapreplace in interface Short2BooleanMapreplace in class AbstractShort2BooleanMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public boolean replace(short key,
boolean value)
Short2BooleanMapreplace in interface Short2BooleanMapreplace in class AbstractShort2BooleanMapkey - the element that should be searched forvalue - the value to replace with.public boolean computeBoolean(short key,
ShortBooleanUnaryOperator mappingFunction)
Short2BooleanMapcomputeBoolean in interface Short2BooleanMapcomputeBoolean in class AbstractShort2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic boolean computeBooleanIfAbsent(short key,
ShortPredicate mappingFunction)
Short2BooleanMapcomputeBooleanIfAbsent in interface Short2BooleanMapcomputeBooleanIfAbsent in class AbstractShort2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic boolean supplyBooleanIfAbsent(short key,
BooleanSupplier valueProvider)
Short2BooleanMapsupplyBooleanIfAbsent in interface Short2BooleanMapsupplyBooleanIfAbsent in class AbstractShort2BooleanMapkey - the key that should be computedvalueProvider - the value if not presentpublic boolean computeBooleanIfPresent(short key,
ShortBooleanUnaryOperator mappingFunction)
Short2BooleanMapcomputeBooleanIfPresent in interface Short2BooleanMapcomputeBooleanIfPresent in class AbstractShort2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic boolean mergeBoolean(short key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
Short2BooleanMapmergeBoolean in interface Short2BooleanMapmergeBoolean in class AbstractShort2BooleanMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllBoolean(Short2BooleanMap m, BooleanBooleanUnaryOperator mappingFunction)
Short2BooleanMapmergeAllBoolean in interface Short2BooleanMapmergeAllBoolean in class AbstractShort2BooleanMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void forEach(ShortBooleanConsumer action)
Short2BooleanMapforEach in interface Short2BooleanMapforEach in class AbstractShort2BooleanMapaction - processor of the values that are iterator overpublic int size()
size in interface java.util.Map<java.lang.Short,java.lang.Boolean>size in class java.util.AbstractMap<java.lang.Short,java.lang.Boolean>public void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Boolean>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Boolean>public Short2BooleanRBTreeMap copy()
Short2BooleanMapcopy in interface Short2BooleanMapcopy in interface Short2BooleanNavigableMapcopy in interface Short2BooleanSortedMapcopy in class AbstractShort2BooleanMappublic ShortNavigableSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Boolean>keySet in interface java.util.SortedMap<java.lang.Short,java.lang.Boolean>keySet in interface Short2BooleanMapkeySet in interface Short2BooleanNavigableMapkeySet in interface Short2BooleanSortedMapkeySet in class AbstractShort2BooleanMappublic ObjectSet<Short2BooleanMap.Entry> short2BooleanEntrySet()
Short2BooleanMapshort2BooleanEntrySet in interface Short2BooleanMappublic BooleanCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Boolean>values in interface java.util.SortedMap<java.lang.Short,java.lang.Boolean>values in interface Short2BooleanMapvalues in interface Short2BooleanSortedMapvalues in class AbstractShort2BooleanMappublic ShortNavigableSet navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>navigableKeySet in interface Short2BooleanNavigableMappublic Short2BooleanNavigableMap descendingMap()
descendingMap in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>descendingMap in interface Short2BooleanNavigableMappublic ShortNavigableSet descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<java.lang.Short,java.lang.Boolean>descendingKeySet in interface Short2BooleanNavigableMappublic Short2BooleanNavigableMap subMap(short fromKey, boolean fromInclusive, short toKey, boolean toInclusive)
Short2BooleanNavigableMapsubMap in interface Short2BooleanNavigableMapfromKey - where the submap should startfromInclusive - if the fromKey is inclusive or nottoKey - where the subMap should endtoInclusive - if the toKey is inclusive or notpublic Short2BooleanNavigableMap headMap(short toKey, boolean inclusive)
Short2BooleanNavigableMapheadMap in interface Short2BooleanNavigableMaptoKey - where the HeadMap should endinclusive - if the toKey is inclusive or notpublic Short2BooleanNavigableMap tailMap(short fromKey, boolean inclusive)
Short2BooleanNavigableMaptailMap in interface Short2BooleanNavigableMapfromKey - where the TailMap should startinclusive - if the fromKey is inclusive or notpublic short lowerKey(short e)
Short2BooleanNavigableMaplowerKey in interface Short2BooleanNavigableMape - that should be compared with.public short floorKey(short e)
Short2BooleanNavigableMapfloorKey in interface Short2BooleanNavigableMape - that should be compared with.public short higherKey(short e)
Short2BooleanNavigableMaphigherKey in interface Short2BooleanNavigableMape - that should be compared with.public short ceilingKey(short e)
Short2BooleanNavigableMapceilingKey in interface Short2BooleanNavigableMape - that should be compared with.public Short2BooleanMap.Entry lowerEntry(short key)
Short2BooleanNavigableMaplowerEntry in interface Short2BooleanNavigableMapkey - that should be compared with.public Short2BooleanMap.Entry higherEntry(short key)
Short2BooleanNavigableMaphigherEntry in interface Short2BooleanNavigableMapkey - that should be compared with.public Short2BooleanMap.Entry floorEntry(short key)
Short2BooleanNavigableMapfloorEntry in interface Short2BooleanNavigableMapkey - that should be compared with.public Short2BooleanMap.Entry ceilingEntry(short key)
Short2BooleanNavigableMapceilingEntry in interface Short2BooleanNavigableMapkey - that should be compared with.