T - the type of elements maintained by this Collectionpublic class Object2BooleanRBTreeMap<T> extends AbstractObject2BooleanMap<T> implements Object2BooleanNavigableMap<T>
AbstractObject2BooleanMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2BooleanSortedMap.FastSortedSet<T>Object2BooleanMap.FastEntrySet<T>| Constructor and Description |
|---|
Object2BooleanRBTreeMap()
Default Constructor
|
Object2BooleanRBTreeMap(java.util.Comparator<T> comp)
Constructor that allows to define the sorter
|
Object2BooleanRBTreeMap(java.util.Map<? extends T,? extends java.lang.Boolean> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2BooleanRBTreeMap(java.util.Map<? extends T,? extends java.lang.Boolean> map,
java.util.Comparator<T> comp)
A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
|
Object2BooleanRBTreeMap(Object2BooleanMap<T> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2BooleanRBTreeMap(Object2BooleanMap<T> map,
java.util.Comparator<T> 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.
|
Object2BooleanRBTreeMap(T[] keys,
boolean[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2BooleanRBTreeMap(T[] keys,
java.lang.Boolean[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2BooleanRBTreeMap(T[] keys,
boolean[] values,
java.util.Comparator<T> comp)
Helper constructor that has a custom sorter and allow to create a map from unboxed values
|
Object2BooleanRBTreeMap(T[] keys,
java.lang.Boolean[] values,
java.util.Comparator<T> comp)
Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
|
| Modifier and Type | Method and Description |
|---|---|
Object2BooleanMap.Entry<T> |
ceilingEntry(T key) |
T |
ceilingKey(T e) |
void |
clear() |
java.util.Comparator<T> |
comparator() |
boolean |
computeBoolean(T key,
ObjectBooleanUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfAbsent(T key,
Object2BooleanFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfPresent(T key,
ObjectBooleanUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key) |
ObjectNavigableSet<T> |
descendingKeySet() |
Object2BooleanNavigableMap<T> |
descendingMap() |
boolean |
firstBooleanValue()
A method to get the first Value of a Map.
|
Object2BooleanMap.Entry<T> |
firstEntry() |
T |
firstKey() |
Object2BooleanMap.Entry<T> |
floorEntry(T key) |
T |
floorKey(T e) |
boolean |
getAndMoveToFirst(T key)
A Specific get method that allows to move teh given key/value int the first index.
|
boolean |
getAndMoveToLast(T key)
A Specific get method that allows to move teh given key/value int the last index.
|
boolean |
getBoolean(T key)
A Type Specific get method to reduce boxing/unboxing
|
T |
getDefaultMaxValue()
only used for primitives
|
T |
getDefaultMinValue()
only used for primitives
|
boolean |
getOrDefault(T key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Object2BooleanNavigableMap<T> |
headMap(T toKey,
boolean inclusive) |
Object2BooleanMap.Entry<T> |
higherEntry(T key) |
T |
higherKey(T e) |
ObjectSortedSet<T> |
keySet() |
boolean |
lastBooleanValue()
A method to get the last Value of a Map.
|
Object2BooleanMap.Entry<T> |
lastEntry() |
T |
lastKey() |
Object2BooleanMap.Entry<T> |
lowerEntry(T key) |
T |
lowerKey(T e) |
void |
mergeAllBoolean(Object2BooleanMap<T> m,
BooleanBooleanUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
boolean |
mergeBoolean(T key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(T key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(T key)
A specific move method to move a given key/value to the last index.
|
ObjectNavigableSet<T> |
navigableKeySet() |
ObjectSet<Object2BooleanMap.Entry<T>> |
object2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
Object2BooleanMap.Entry<T> |
pollFirstEntry() |
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
Object2BooleanMap.Entry<T> |
pollLastEntry() |
T |
pollLastKey()
A method to get and remove the last Key of a Map.
|
boolean |
put(T key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
putAndMoveToFirst(T key,
boolean value)
A customized put method that allows you to insert into the first index.
|
boolean |
putAndMoveToLast(T key,
boolean value)
A customized put method that allows you to insert into the last index.
|
boolean |
putIfAbsent(T key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remOrDefault(T key,
boolean defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
boolean value)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
replace(T key,
boolean value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
boolean oldValue,
boolean newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
Object2BooleanNavigableMap<T> |
subMap(T fromKey,
boolean fromInclusive,
T toKey,
boolean toInclusive) |
Object2BooleanNavigableMap<T> |
tailMap(T fromKey,
boolean inclusive) |
BooleanCollection |
values() |
containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceBooleans, replaceBooleans, setDefaultReturnValueheadMap, subMap, tailMapcompute, computeIfAbsent, computeIfPresent, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replaceAll, replaceBooleans, replaceBooleans, setDefaultReturnValuepublic Object2BooleanRBTreeMap()
public Object2BooleanRBTreeMap(java.util.Comparator<T> comp)
comp - the function that decides how the tree is sorted, can be nullpublic Object2BooleanRBTreeMap(T[] 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 Object2BooleanRBTreeMap(T[] keys, java.lang.Boolean[] values, java.util.Comparator<T> 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 Object2BooleanRBTreeMap(T[] 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 Object2BooleanRBTreeMap(T[] keys, boolean[] values, java.util.Comparator<T> 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 Object2BooleanRBTreeMap(java.util.Map<? extends T,? extends java.lang.Boolean> map)
map - the values that should be present in the mappublic Object2BooleanRBTreeMap(java.util.Map<? extends T,? extends java.lang.Boolean> map, java.util.Comparator<T> comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic Object2BooleanRBTreeMap(Object2BooleanMap<T> map)
map - the values that should be present in the mappublic Object2BooleanRBTreeMap(Object2BooleanMap<T> map, java.util.Comparator<T> comp)
map - the values that should be present in the mapcomp - the function that decides how the tree is sorted, can be nullpublic T getDefaultMaxValue()
public T getDefaultMinValue()
public boolean put(T key, boolean value)
Object2BooleanMapput in interface Object2BooleanMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public boolean putIfAbsent(T key, boolean value)
Object2BooleanMapputIfAbsent in interface Object2BooleanMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public boolean putAndMoveToFirst(T key, boolean value)
Object2BooleanSortedMapputAndMoveToFirst in interface Object2BooleanSortedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean putAndMoveToLast(T key, boolean value)
Object2BooleanSortedMapputAndMoveToLast in interface Object2BooleanSortedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2BooleanSortedMapmoveToFirst in interface Object2BooleanSortedMap<T>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2BooleanSortedMapmoveToLast in interface Object2BooleanSortedMap<T>key - that should be moved to the first lastpublic boolean getAndMoveToFirst(T key)
Object2BooleanSortedMapgetAndMoveToFirst in interface Object2BooleanSortedMap<T>key - that is searched forpublic boolean getAndMoveToLast(T key)
Object2BooleanSortedMapgetAndMoveToLast in interface Object2BooleanSortedMap<T>key - that is searched forpublic java.util.Comparator<T> comparator()
comparator in interface java.util.SortedMap<T,java.lang.Boolean>comparator in interface Object2BooleanSortedMap<T>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Boolean>containsKey in class AbstractObject2BooleanMap<T>public boolean getBoolean(T key)
Object2BooleanMapgetBoolean in interface Object2BooleanFunction<T>getBoolean in interface Object2BooleanMap<T>key - the key that is searched forpublic boolean getOrDefault(T key, boolean defaultValue)
Object2BooleanMapgetOrDefault in interface Object2BooleanMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic T firstKey()
firstKey in interface java.util.SortedMap<T,java.lang.Boolean>public T pollFirstKey()
Object2BooleanSortedMappollFirstKey in interface Object2BooleanSortedMap<T>public T lastKey()
lastKey in interface java.util.SortedMap<T,java.lang.Boolean>public T pollLastKey()
Object2BooleanSortedMappollLastKey in interface Object2BooleanSortedMap<T>public Object2BooleanMap.Entry<T> firstEntry()
firstEntry in interface java.util.NavigableMap<T,java.lang.Boolean>firstEntry in interface Object2BooleanNavigableMap<T>public Object2BooleanMap.Entry<T> lastEntry()
lastEntry in interface java.util.NavigableMap<T,java.lang.Boolean>lastEntry in interface Object2BooleanNavigableMap<T>public Object2BooleanMap.Entry<T> pollFirstEntry()
pollFirstEntry in interface java.util.NavigableMap<T,java.lang.Boolean>pollFirstEntry in interface Object2BooleanNavigableMap<T>public Object2BooleanMap.Entry<T> pollLastEntry()
pollLastEntry in interface java.util.NavigableMap<T,java.lang.Boolean>pollLastEntry in interface Object2BooleanNavigableMap<T>public boolean firstBooleanValue()
Object2BooleanSortedMapfirstBooleanValue in interface Object2BooleanSortedMap<T>public boolean lastBooleanValue()
Object2BooleanSortedMaplastBooleanValue in interface Object2BooleanSortedMap<T>public boolean rem(T key)
Object2BooleanMaprem in interface Object2BooleanMap<T>key - the element that should be removedpublic boolean remOrDefault(T key, boolean defaultValue)
Object2BooleanMapremOrDefault in interface Object2BooleanMap<T>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, boolean value)
Object2BooleanMapremove in interface Object2BooleanMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(T key, boolean oldValue, boolean newValue)
Object2BooleanMapreplace in interface Object2BooleanMap<T>replace in class AbstractObject2BooleanMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public boolean replace(T key, boolean value)
Object2BooleanMapreplace in interface Object2BooleanMap<T>replace in class AbstractObject2BooleanMap<T>key - the element that should be searched forvalue - the value to replace with.public boolean computeBoolean(T key, ObjectBooleanUnaryOperator<T> mappingFunction)
Object2BooleanMapcomputeBoolean in interface Object2BooleanMap<T>computeBoolean in class AbstractObject2BooleanMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic boolean computeBooleanIfAbsent(T key, Object2BooleanFunction<T> mappingFunction)
Object2BooleanMapcomputeBooleanIfAbsent in interface Object2BooleanMap<T>computeBooleanIfAbsent in class AbstractObject2BooleanMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic boolean computeBooleanIfPresent(T key, ObjectBooleanUnaryOperator<T> mappingFunction)
Object2BooleanMapcomputeBooleanIfPresent in interface Object2BooleanMap<T>computeBooleanIfPresent in class AbstractObject2BooleanMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic boolean mergeBoolean(T key, boolean value, BooleanBooleanUnaryOperator mappingFunction)
Object2BooleanMapmergeBoolean in interface Object2BooleanMap<T>mergeBoolean in class AbstractObject2BooleanMap<T>key - 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(Object2BooleanMap<T> m, BooleanBooleanUnaryOperator mappingFunction)
Object2BooleanMapmergeAllBoolean in interface Object2BooleanMap<T>mergeAllBoolean in class AbstractObject2BooleanMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
public void clear()
public ObjectSortedSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Boolean>keySet in interface java.util.SortedMap<T,java.lang.Boolean>keySet in interface Object2BooleanMap<T>keySet in interface Object2BooleanSortedMap<T>keySet in class AbstractObject2BooleanMap<T>public ObjectSet<Object2BooleanMap.Entry<T>> object2BooleanEntrySet()
Object2BooleanMapobject2BooleanEntrySet in interface Object2BooleanMap<T>public BooleanCollection values()
values in interface java.util.Map<T,java.lang.Boolean>values in interface java.util.SortedMap<T,java.lang.Boolean>values in interface Object2BooleanMap<T>values in interface Object2BooleanSortedMap<T>values in class AbstractObject2BooleanMap<T>public ObjectNavigableSet<T> navigableKeySet()
navigableKeySet in interface java.util.NavigableMap<T,java.lang.Boolean>navigableKeySet in interface Object2BooleanNavigableMap<T>public Object2BooleanNavigableMap<T> descendingMap()
descendingMap in interface java.util.NavigableMap<T,java.lang.Boolean>descendingMap in interface Object2BooleanNavigableMap<T>public ObjectNavigableSet<T> descendingKeySet()
descendingKeySet in interface java.util.NavigableMap<T,java.lang.Boolean>descendingKeySet in interface Object2BooleanNavigableMap<T>public Object2BooleanNavigableMap<T> subMap(T fromKey, boolean fromInclusive, T toKey, boolean toInclusive)
subMap in interface java.util.NavigableMap<T,java.lang.Boolean>subMap in interface Object2BooleanNavigableMap<T>public Object2BooleanNavigableMap<T> headMap(T toKey, boolean inclusive)
headMap in interface java.util.NavigableMap<T,java.lang.Boolean>headMap in interface Object2BooleanNavigableMap<T>public Object2BooleanNavigableMap<T> tailMap(T fromKey, boolean inclusive)
tailMap in interface java.util.NavigableMap<T,java.lang.Boolean>tailMap in interface Object2BooleanNavigableMap<T>public T lowerKey(T e)
lowerKey in interface java.util.NavigableMap<T,java.lang.Boolean>public T floorKey(T e)
floorKey in interface java.util.NavigableMap<T,java.lang.Boolean>public T higherKey(T e)
higherKey in interface java.util.NavigableMap<T,java.lang.Boolean>public T ceilingKey(T e)
ceilingKey in interface java.util.NavigableMap<T,java.lang.Boolean>public Object2BooleanMap.Entry<T> lowerEntry(T key)
lowerEntry in interface java.util.NavigableMap<T,java.lang.Boolean>lowerEntry in interface Object2BooleanNavigableMap<T>public Object2BooleanMap.Entry<T> higherEntry(T key)
higherEntry in interface java.util.NavigableMap<T,java.lang.Boolean>higherEntry in interface Object2BooleanNavigableMap<T>public Object2BooleanMap.Entry<T> floorEntry(T key)
floorEntry in interface java.util.NavigableMap<T,java.lang.Boolean>floorEntry in interface Object2BooleanNavigableMap<T>public Object2BooleanMap.Entry<T> ceilingEntry(T key)
ceilingEntry in interface java.util.NavigableMap<T,java.lang.Boolean>ceilingEntry in interface Object2BooleanNavigableMap<T>