V - the type of elements maintained by this Collectionpublic abstract class AbstractBoolean2ObjectMap<V> extends java.util.AbstractMap<java.lang.Boolean,V> implements Boolean2ObjectMap<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractBoolean2ObjectMap.BasicEntry<V>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Boolean2ObjectMap.Entry<V>, Boolean2ObjectMap.FastEntrySet<V>| Constructor and Description |
|---|
AbstractBoolean2ObjectMap() |
| Modifier and Type | Method and Description |
|---|---|
V |
compute(boolean key,
BooleanObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(boolean key,
Boolean2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(boolean key,
BooleanObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(boolean key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Boolean2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Boolean,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(BooleanObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(boolean key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
BooleanSet |
keySet() |
V |
merge(boolean key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Boolean2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(java.lang.Boolean key,
V value)
Deprecated.
|
void |
putAll(boolean[] keys,
V[] 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(java.lang.Boolean[] keys,
V[] 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 |
putAll(Boolean2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Boolean,? extends V> m) |
void |
putAllIfAbsent(Boolean2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
remove(java.lang.Object key) |
V |
replace(boolean key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(boolean key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceObjects(Boolean2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(BooleanObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractBoolean2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(boolean key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
boolean2ObjectEntrySet, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, get, merge, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAllpublic V getDefaultReturnValue()
Boolean2ObjectMapgetDefaultReturnValue in interface Boolean2ObjectMap<V>public AbstractBoolean2ObjectMap<V> setDefaultReturnValue(V v)
Boolean2ObjectMapsetDefaultReturnValue in interface Boolean2ObjectMap<V>v - value that should be the default return valuepublic Boolean2ObjectMap<V> copy()
Boolean2ObjectMapcopy in interface Boolean2ObjectMap<V>@Deprecated public V put(java.lang.Boolean key, V value)
put in interface java.util.Map<java.lang.Boolean,V>put in interface Boolean2ObjectMap<V>put in class java.util.AbstractMap<java.lang.Boolean,V>public void putAll(Boolean2ObjectMap<V> m)
Boolean2ObjectMapputAll in interface Boolean2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Boolean,? extends V> m)
public void putAll(boolean[] keys,
V[] values,
int offset,
int size)
Boolean2ObjectMapputAll in interface Boolean2ObjectMap<V>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(java.lang.Boolean[] keys,
V[] values,
int offset,
int size)
Boolean2ObjectMapputAll in interface Boolean2ObjectMap<V>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(Boolean2ObjectMap<V> m)
Boolean2ObjectMapputAllIfAbsent in interface Boolean2ObjectMap<V>m - elements that should be added if not present.public boolean containsKey(boolean key)
Boolean2ObjectMapcontainsKey in interface Boolean2ObjectMap<V>key - element that is searched forpublic boolean containsValue(java.lang.Object value)
public boolean replace(boolean key,
V oldValue,
V newValue)
Boolean2ObjectMapreplace in interface Boolean2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(boolean key, V value)
Boolean2ObjectMapreplace in interface Boolean2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Boolean2ObjectMap<V> m)
Boolean2ObjectMapreplaceObjects in interface Boolean2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(BooleanObjectUnaryOperator<V> mappingFunction)
Boolean2ObjectMapreplaceObjects in interface Boolean2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(boolean key, BooleanObjectUnaryOperator<V> mappingFunction)
Boolean2ObjectMapcompute in interface Boolean2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(boolean key, Boolean2ObjectFunction<V> mappingFunction)
Boolean2ObjectMapcomputeIfAbsent in interface Boolean2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(boolean key, ObjectSupplier<V> valueProvider)
Boolean2ObjectMapsupplyIfAbsent in interface Boolean2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(boolean key, BooleanObjectUnaryOperator<V> mappingFunction)
Boolean2ObjectMapcomputeIfPresent in interface Boolean2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(boolean key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Boolean2ObjectMapmerge in interface Boolean2ObjectMap<V>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 mergeAll(Boolean2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Boolean2ObjectMapmergeAll in interface Boolean2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Boolean,V>get in interface Boolean2ObjectMap<V>get in class java.util.AbstractMap<java.lang.Boolean,V>public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Boolean,V>getOrDefault in interface Boolean2ObjectMap<V>public V getOrDefault(boolean key, V defaultValue)
Boolean2ObjectMapgetOrDefault in interface Boolean2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Boolean,V>remove in interface Boolean2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Boolean,V>key - the element that should be removedMap.remove(Object)public void forEach(BooleanObjectConsumer<V> action)
Boolean2ObjectMapforEach in interface Boolean2ObjectMap<V>action - processor of the values that are iterator overpublic BooleanSet keySet()
keySet in interface java.util.Map<java.lang.Boolean,V>keySet in interface Boolean2ObjectMap<V>keySet in class java.util.AbstractMap<java.lang.Boolean,V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Boolean,V>values in interface Boolean2ObjectMap<V>values in class java.util.AbstractMap<java.lang.Boolean,V>public ObjectSet<java.util.Map.Entry<java.lang.Boolean,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Boolean,V>entrySet in interface Boolean2ObjectMap<V>entrySet in class java.util.AbstractMap<java.lang.Boolean,V>public boolean equals(java.lang.Object o)