T - the keyType of elements maintained by this Collectionpublic abstract class AbstractObject2BooleanMap<T> extends java.util.AbstractMap<T,java.lang.Boolean> implements Object2BooleanMap<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2BooleanMap.BasicEntry<T>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2BooleanMap.BuilderCache<T>, Object2BooleanMap.Entry<T>, Object2BooleanMap.FastEntrySet<T>, Object2BooleanMap.MapBuilder| Constructor and Description |
|---|
AbstractObject2BooleanMap() |
| Modifier and Type | Method and Description |
|---|---|
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
|
Object2BooleanMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<T,java.lang.Boolean>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectBooleanConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Boolean |
get(java.lang.Object key) |
boolean |
getDefaultReturnValue()
Method to see what the default return value is.
|
java.lang.Boolean |
getOrDefault(java.lang.Object key,
java.lang.Boolean defaultValue) |
int |
hashCode() |
ObjectSet<T> |
keySet() |
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
|
java.lang.Boolean |
put(T key,
java.lang.Boolean value)
Deprecated.
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Boolean> m) |
void |
putAll(Object2BooleanMap<T> m)
Type Specific function for the bull putting of values
|
void |
putAll(T[] keys,
boolean[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(T[] keys,
java.lang.Boolean[] values,
int offset,
int size)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAllIfAbsent(Object2BooleanMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Boolean |
remove(java.lang.Object key) |
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
|
void |
replaceBooleans(Object2BooleanMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceBooleans(ObjectBooleanUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractObject2BooleanMap<T> |
setDefaultReturnValue(boolean v)
Method to define the default return value if a requested key isn't present
|
boolean |
supplyBooleanIfAbsent(T key,
BooleanSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
BooleanCollection |
values() |
builder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getBoolean, getOrDefault, merge, object2BooleanEntrySet, put, put, put, putAll, putAll, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, replaceAll, synchronize, synchronize, test, unmodifiablepublic boolean getDefaultReturnValue()
Object2BooleanMapgetDefaultReturnValue in interface Object2BooleanMap<T>public AbstractObject2BooleanMap<T> setDefaultReturnValue(boolean v)
Object2BooleanMapsetDefaultReturnValue in interface Object2BooleanMap<T>v - value that should be the default return valuepublic Object2BooleanMap<T> copy()
Object2BooleanMapcopy in interface Object2BooleanMap<T>@Deprecated public java.lang.Boolean put(T key, java.lang.Boolean value)
put in interface java.util.Map<T,java.lang.Boolean>put in interface Object2BooleanMap<T>put in class java.util.AbstractMap<T,java.lang.Boolean>public void putAll(Object2BooleanMap<T> m)
Object2BooleanMapputAll in interface Object2BooleanMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Boolean> m)
public void putAll(T[] keys, boolean[] values, int offset, int size)
Object2BooleanMapputAll in interface Object2BooleanMap<T>keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAll(T[] keys, java.lang.Boolean[] values, int offset, int size)
Object2BooleanMapputAll in interface Object2BooleanMap<T>keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAllIfAbsent(Object2BooleanMap<T> m)
Object2BooleanMapputAllIfAbsent in interface Object2BooleanMap<T>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(boolean value)
Object2BooleanMapcontainsValue in interface Object2BooleanMap<T>value - element that is searched forpublic boolean replace(T key, boolean oldValue, boolean newValue)
Object2BooleanMapreplace in interface Object2BooleanMap<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>key - the element that should be searched forvalue - the value to replace with.public void replaceBooleans(Object2BooleanMap<T> m)
Object2BooleanMapreplaceBooleans in interface Object2BooleanMap<T>m - elements that should be replaced.public void replaceBooleans(ObjectBooleanUnaryOperator<T> mappingFunction)
Object2BooleanMapreplaceBooleans in interface Object2BooleanMap<T>mappingFunction - operation to replace all valuespublic boolean computeBoolean(T key, ObjectBooleanUnaryOperator<T> mappingFunction)
Object2BooleanMapcomputeBoolean in interface Object2BooleanMap<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>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>key - the key that should be computedvalueProvider - the value if not presentpublic boolean computeBooleanIfPresent(T key, ObjectBooleanUnaryOperator<T> mappingFunction)
Object2BooleanMapcomputeBooleanIfPresent in interface Object2BooleanMap<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>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>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Boolean get(java.lang.Object key)
get in interface java.util.Map<T,java.lang.Boolean>get in interface Object2BooleanMap<T>get in class java.util.AbstractMap<T,java.lang.Boolean>public java.lang.Boolean getOrDefault(java.lang.Object key,
java.lang.Boolean defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Boolean>getOrDefault in interface Object2BooleanMap<T>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 java.util.AbstractMap<T,java.lang.Boolean>key - the element that should be removedMap.remove(Object)public void forEach(ObjectBooleanConsumer<T> action)
Object2BooleanMapforEach in interface Object2BooleanMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Boolean>keySet in interface Object2BooleanMap<T>keySet in class java.util.AbstractMap<T,java.lang.Boolean>public BooleanCollection values()
values in interface java.util.Map<T,java.lang.Boolean>values in interface Object2BooleanMap<T>values in class java.util.AbstractMap<T,java.lang.Boolean>public ObjectSet<java.util.Map.Entry<T,java.lang.Boolean>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Boolean>entrySet in interface Object2BooleanMap<T>entrySet in class java.util.AbstractMap<T,java.lang.Boolean>public boolean equals(java.lang.Object o)