T - the type of elements maintained by this Collectionpublic class Object2BooleanOpenCustomHashMap<T> extends AbstractObject2BooleanMap<T>
AbstractObject2BooleanMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2BooleanMap.Entry<T>, Object2BooleanMap.FastEntrySet<T>| Constructor and Description |
|---|
Object2BooleanOpenCustomHashMap(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity and load factor
|
Object2BooleanOpenCustomHashMap(int minCapacity,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity
|
Object2BooleanOpenCustomHashMap(java.util.Map<? extends T,? extends java.lang.Boolean> map,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2BooleanOpenCustomHashMap(java.util.Map<? extends T,? extends java.lang.Boolean> map,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2BooleanOpenCustomHashMap(Object2BooleanMap<T> map,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2BooleanOpenCustomHashMap(Object2BooleanMap<T> map,
ObjectStrategy<? super T> strategy)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2BooleanOpenCustomHashMap(ObjectStrategy<? super T> strategy)
Default Contstructor
|
Object2BooleanOpenCustomHashMap(T[] keys,
boolean[] values,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a map from unboxed values
|
Object2BooleanOpenCustomHashMap(T[] keys,
java.lang.Boolean[] values,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2BooleanOpenCustomHashMap(T[] keys,
boolean[] values,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a map from unboxed values
|
Object2BooleanOpenCustomHashMap(T[] keys,
java.lang.Boolean[] values,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
| 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,
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)
Deprecated.
|
boolean |
containsValue(boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
void |
forEach(ObjectBooleanConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Boolean |
get(java.lang.Object key) |
boolean |
getBoolean(T key)
A Type Specific get method to reduce boxing/unboxing
|
boolean |
getOrDefault(T key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
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
|
ObjectSet<Object2BooleanMap.Entry<T>> |
object2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
boolean |
put(T key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
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)
Deprecated.
|
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() |
BooleanCollection |
values() |
entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceBooleans, replaceBooleans, setDefaultReturnValuecompute, computeIfAbsent, computeIfPresent, forEach, merge, put, putAll, putIfAbsent, replace, replace, replaceAllpublic Object2BooleanOpenCustomHashMap(ObjectStrategy<? super T> strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Object2BooleanOpenCustomHashMap(int minCapacity,
ObjectStrategy<? super T> strategy)
minCapacity - the minimum capacity the HashMap is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic Object2BooleanOpenCustomHashMap(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Object2BooleanOpenCustomHashMap(T[] keys, java.lang.Boolean[] values, ObjectStrategy<? super T> strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Object2BooleanOpenCustomHashMap(T[] keys, java.lang.Boolean[] values, float loadFactor, ObjectStrategy<? super T> strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Object2BooleanOpenCustomHashMap(T[] keys, boolean[] values, ObjectStrategy<? super T> strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Object2BooleanOpenCustomHashMap(T[] keys, boolean[] values, float loadFactor, ObjectStrategy<? super T> strategy)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Object2BooleanOpenCustomHashMap(java.util.Map<? extends T,? extends java.lang.Boolean> map, ObjectStrategy<? super T> strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Object2BooleanOpenCustomHashMap(java.util.Map<? extends T,? extends java.lang.Boolean> map, float loadFactor, ObjectStrategy<? super T> strategy)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Object2BooleanOpenCustomHashMap(Object2BooleanMap<T> map, ObjectStrategy<? super T> strategy)
map - the values that should be present in the mapstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic Object2BooleanOpenCustomHashMap(Object2BooleanMap<T> map, float loadFactor, ObjectStrategy<? super T> strategy)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean put(T key, boolean value)
Object2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public boolean putIfAbsent(T key, boolean value)
Object2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Boolean>containsKey in class AbstractObject2BooleanMap<T>public boolean containsValue(boolean value)
Object2BooleanMapcontainsValue in interface Object2BooleanMap<T>containsValue in class AbstractObject2BooleanMap<T>value - element that is searched for@Deprecated 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 rem(T key)
Object2BooleanMapkey - the element that should be removedpublic boolean remOrDefault(T key, boolean defaultValue)
Object2BooleanMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)@Deprecated 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 boolean remove(T key, boolean value)
Object2BooleanMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean getBoolean(T key)
Object2BooleanMapkey - the key that is searched forpublic 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 AbstractObject2BooleanMap<T>public boolean getOrDefault(T key, boolean defaultValue)
Object2BooleanMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<Object2BooleanMap.Entry<T>> object2BooleanEntrySet()
Object2BooleanMappublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Boolean>keySet in interface Object2BooleanMap<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 void forEach(ObjectBooleanConsumer<T> action)
Object2BooleanMapforEach in interface Object2BooleanMap<T>forEach in class AbstractObject2BooleanMap<T>action - processor of the values that are iterator overpublic 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()