T - the keyType of elements maintained by this Collectionpublic class Object2BooleanArrayMap<T> extends AbstractObject2BooleanMap<T> implements Object2BooleanOrderedMap<T>
AbstractObject2BooleanMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2BooleanOrderedMap.FastOrderedSet<T>Object2BooleanMap.BuilderCache<T>, Object2BooleanMap.Entry<T>, Object2BooleanMap.FastEntrySet<T>, Object2BooleanMap.MapBuilder| Constructor and Description |
|---|
Object2BooleanArrayMap()
Default Constructor
|
Object2BooleanArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Object2BooleanArrayMap(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.
|
Object2BooleanArrayMap(Object2BooleanMap<T> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2BooleanArrayMap(T[] keys,
boolean[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2BooleanArrayMap(T[] keys,
java.lang.Boolean[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2BooleanArrayMap(T[] keys,
boolean[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Object2BooleanArrayMap(T[] keys,
java.lang.Boolean[] values,
int length)
Helper constructor that allow to create a map from boxed values (it will unbox them) with a custom length
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
computeBoolean(T key,
ObjectBooleanUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfAbsent(T key,
java.util.function.Predicate<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) |
boolean |
containsValue(boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Object2BooleanArrayMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
boolean |
firstBooleanValue()
A method to get the first Value of a Map.
|
T |
firstKey()
A method to get the first Key of a Map.
|
void |
forEach(ObjectBooleanConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
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
|
boolean |
getOrDefault(java.lang.Object key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectOrderedSet<T> |
keySet() |
boolean |
lastBooleanValue()
A method to get the last Value of a Map.
|
T |
lastKey()
A method to get the last Key of a Map.
|
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.
|
ObjectOrderedSet<Object2BooleanMap.Entry<T>> |
object2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
T |
pollFirstKey()
A method to get and remove the first Key of a Map.
|
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.
|
java.lang.Boolean |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
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() |
boolean |
supplyBooleanIfAbsent(T key,
BooleanSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
BooleanCollection |
values() |
entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, replaceBooleans, replaceBooleans, setDefaultReturnValuesynchronize, synchronize, unmodifiablebuilder, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceBooleans, replaceBooleans, setDefaultReturnValue, testpublic Object2BooleanArrayMap()
public Object2BooleanArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Object2BooleanArrayMap(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 lengthpublic Object2BooleanArrayMap(T[] keys, java.lang.Boolean[] values, int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lengthpublic Object2BooleanArrayMap(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 Object2BooleanArrayMap(T[] keys, boolean[] values, int length)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.length - the amount of values that should be pulled from the arrayjava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Object2BooleanArrayMap(java.util.Map<? extends T,? extends java.lang.Boolean> map)
map - the values that should be present in the mappublic Object2BooleanArrayMap(Object2BooleanMap<T> map)
map - the values that should be present in the mappublic 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)
Object2BooleanOrderedMapputAndMoveToFirst in interface Object2BooleanOrderedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean putAndMoveToLast(T key, boolean value)
Object2BooleanOrderedMapputAndMoveToLast in interface Object2BooleanOrderedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2BooleanOrderedMapmoveToFirst in interface Object2BooleanOrderedMap<T>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2BooleanOrderedMapmoveToLast in interface Object2BooleanOrderedMap<T>key - that should be moved to the first lastpublic boolean containsValue(boolean value)
Object2BooleanMapcontainsValue in interface Object2BooleanMap<T>containsValue in class AbstractObject2BooleanMap<T>value - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Boolean>containsKey in class AbstractObject2BooleanMap<T>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<T,java.lang.Boolean>containsValue in interface Object2BooleanMap<T>containsValue in class java.util.AbstractMap<T,java.lang.Boolean>value - that is searched for.Map.containsValue(Object)public boolean getBoolean(T key)
Object2BooleanMapgetBoolean in interface Object2BooleanMap<T>key - the key that is searched forpublic boolean getOrDefault(java.lang.Object 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 boolean getAndMoveToFirst(T key)
Object2BooleanOrderedMapgetAndMoveToFirst in interface Object2BooleanOrderedMap<T>key - that is searched forpublic boolean getAndMoveToLast(T key)
Object2BooleanOrderedMapgetAndMoveToLast in interface Object2BooleanOrderedMap<T>key - that is searched forpublic T firstKey()
Object2BooleanOrderedMapfirstKey in interface Object2BooleanOrderedMap<T>public T lastKey()
Object2BooleanOrderedMaplastKey in interface Object2BooleanOrderedMap<T>public boolean firstBooleanValue()
Object2BooleanOrderedMapfirstBooleanValue in interface Object2BooleanOrderedMap<T>public boolean lastBooleanValue()
Object2BooleanOrderedMaplastBooleanValue in interface Object2BooleanOrderedMap<T>public T pollFirstKey()
Object2BooleanOrderedMappollFirstKey in interface Object2BooleanOrderedMap<T>public T pollLastKey()
Object2BooleanOrderedMappollLastKey in interface Object2BooleanOrderedMap<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 java.lang.Boolean remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Boolean>remove in interface Object2BooleanMap<T>remove in class AbstractObject2BooleanMap<T>key - the element that should be removedMap.remove(Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<T,java.lang.Boolean>remove in interface Object2BooleanMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(ObjectBooleanConsumer<T> action)
Object2BooleanMapforEach in interface Object2BooleanMap<T>forEach in class AbstractObject2BooleanMap<T>action - processor of the values that are iterator overpublic ObjectOrderedSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Boolean>keySet in interface Object2BooleanMap<T>keySet in interface Object2BooleanOrderedMap<T>keySet in class AbstractObject2BooleanMap<T>public BooleanCollection values()
values in interface java.util.Map<T,java.lang.Boolean>values in interface Object2BooleanMap<T>values in class AbstractObject2BooleanMap<T>public ObjectOrderedSet<Object2BooleanMap.Entry<T>> object2BooleanEntrySet()
Object2BooleanMapobject2BooleanEntrySet in interface Object2BooleanMap<T>object2BooleanEntrySet in interface Object2BooleanOrderedMap<T>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, java.util.function.Predicate<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 supplyBooleanIfAbsent(T key, BooleanSupplier valueProvider)
Object2BooleanMapsupplyBooleanIfAbsent in interface Object2BooleanMap<T>supplyBooleanIfAbsent in class AbstractObject2BooleanMap<T>key - the key that should be computedvalueProvider - 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 Object2BooleanArrayMap<T> copy()
Object2BooleanMapcopy in interface Object2BooleanMap<T>copy in interface Object2BooleanOrderedMap<T>copy in class AbstractObject2BooleanMap<T>