public class Char2BooleanArrayMap extends AbstractChar2BooleanMap implements Char2BooleanOrderedMap
AbstractChar2BooleanMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2BooleanOrderedMap.FastOrderedSetChar2BooleanMap.BuilderCache, Char2BooleanMap.Entry, Char2BooleanMap.FastEntrySet, Char2BooleanMap.MapBuilder| Constructor and Description |
|---|
Char2BooleanArrayMap()
Default Constructor
|
Char2BooleanArrayMap(char[] keys,
boolean[] values)
Helper constructor that allow to create a map from unboxed values
|
Char2BooleanArrayMap(char[] keys,
boolean[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Char2BooleanArrayMap(Char2BooleanMap map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2BooleanArrayMap(java.lang.Character[] keys,
java.lang.Boolean[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2BooleanArrayMap(java.lang.Character[] 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
|
Char2BooleanArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Char2BooleanArrayMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Boolean> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectOrderedSet<Char2BooleanMap.Entry> |
char2BooleanEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
boolean |
computeBoolean(char key,
CharBooleanUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfAbsent(char key,
Char2BooleanFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
computeBooleanIfPresent(char key,
CharBooleanUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(char key)
Type Specific method to reduce boxing/unboxing of values
|
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) |
Char2BooleanArrayMap |
copy()
A Function that does a shallow clone of the Map itself.
|
boolean |
firstBooleanValue()
A method to get the first Value of a Map.
|
char |
firstCharKey()
A method to get the first Key of a Map.
|
void |
forEach(CharBooleanConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
boolean |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
boolean |
getAndMoveToFirst(char key)
A Specific get method that allows to move teh given key/value int the first index.
|
boolean |
getAndMoveToLast(char key)
A Specific get method that allows to move teh given key/value int the last index.
|
boolean |
getOrDefault(char key,
boolean defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
CharOrderedSet |
keySet() |
boolean |
lastBooleanValue()
A method to get the last Value of a Map.
|
char |
lastCharKey()
A method to get the last Key of a Map.
|
void |
mergeAllBoolean(Char2BooleanMap m,
BooleanBooleanUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
boolean |
mergeBoolean(char key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
boolean |
moveToFirst(char key)
A specific move method to move a given key/value to the first index.
|
boolean |
moveToLast(char key)
A specific move method to move a given key/value to the last index.
|
char |
pollFirstCharKey()
A method to get and remove the first Key of a Map.
|
char |
pollLastCharKey()
A method to get and remove the last Key of a Map.
|
boolean |
put(char key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
putAndMoveToFirst(char key,
boolean value)
A customized put method that allows you to insert into the first index.
|
boolean |
putAndMoveToLast(char key,
boolean value)
A customized put method that allows you to insert into the last index.
|
boolean |
putIfAbsent(char key,
boolean value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
boolean value)
Type Specific remove function to reduce boxing/unboxing
|
java.lang.Boolean |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
boolean |
removeOrDefault(char key,
boolean defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
replace(char key,
boolean value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
boolean oldValue,
boolean newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
boolean |
supplyBooleanIfAbsent(char 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, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceBooleans, replaceBooleans, setDefaultReturnValuepublic Char2BooleanArrayMap()
public Char2BooleanArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Char2BooleanArrayMap(java.lang.Character[] 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 Char2BooleanArrayMap(java.lang.Character[] 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 Char2BooleanArrayMap(char[] 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 Char2BooleanArrayMap(char[] 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 Char2BooleanArrayMap(java.util.Map<? extends java.lang.Character,? extends java.lang.Boolean> map)
map - the values that should be present in the mappublic Char2BooleanArrayMap(Char2BooleanMap map)
map - the values that should be present in the mappublic boolean put(char key,
boolean value)
Char2BooleanMapput in interface Char2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public boolean putIfAbsent(char key,
boolean value)
Char2BooleanMapputIfAbsent in interface Char2BooleanMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public boolean putAndMoveToFirst(char key,
boolean value)
Char2BooleanOrderedMapputAndMoveToFirst in interface Char2BooleanOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean putAndMoveToLast(char key,
boolean value)
Char2BooleanOrderedMapputAndMoveToLast in interface Char2BooleanOrderedMapkey - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(char key)
Char2BooleanOrderedMapmoveToFirst in interface Char2BooleanOrderedMapkey - that should be moved to the first indexpublic boolean moveToLast(char key)
Char2BooleanOrderedMapmoveToLast in interface Char2BooleanOrderedMapkey - that should be moved to the first lastpublic boolean containsKey(char key)
Char2BooleanMapcontainsKey in interface Char2BooleanMapcontainsKey in class AbstractChar2BooleanMapkey - element that is searched forpublic boolean containsValue(boolean value)
Char2BooleanMapcontainsValue in interface Char2BooleanMapcontainsValue in class AbstractChar2BooleanMapvalue - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,java.lang.Boolean>containsKey in interface Char2BooleanMapcontainsKey in class java.util.AbstractMap<java.lang.Character,java.lang.Boolean>key - that is searched for.Map.containsKey(Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Character,java.lang.Boolean>containsValue in interface Char2BooleanMapcontainsValue in class java.util.AbstractMap<java.lang.Character,java.lang.Boolean>value - that is searched for.Map.containsValue(Object)public boolean get(char key)
Char2BooleanMapget in interface Char2BooleanFunctionget in interface Char2BooleanMapkey - the key that is searched forpublic boolean getOrDefault(char key,
boolean defaultValue)
Char2BooleanMapgetOrDefault in interface Char2BooleanMapgetOrDefault in class AbstractChar2BooleanMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic boolean getAndMoveToFirst(char key)
Char2BooleanOrderedMapgetAndMoveToFirst in interface Char2BooleanOrderedMapkey - that is searched forpublic boolean getAndMoveToLast(char key)
Char2BooleanOrderedMapgetAndMoveToLast in interface Char2BooleanOrderedMapkey - that is searched forpublic char firstCharKey()
Char2BooleanOrderedMapfirstCharKey in interface Char2BooleanOrderedMappublic char lastCharKey()
Char2BooleanOrderedMaplastCharKey in interface Char2BooleanOrderedMappublic boolean firstBooleanValue()
Char2BooleanOrderedMapfirstBooleanValue in interface Char2BooleanOrderedMappublic boolean lastBooleanValue()
Char2BooleanOrderedMaplastBooleanValue in interface Char2BooleanOrderedMappublic char pollFirstCharKey()
Char2BooleanOrderedMappollFirstCharKey in interface Char2BooleanOrderedMappublic char pollLastCharKey()
Char2BooleanOrderedMappollLastCharKey in interface Char2BooleanOrderedMappublic boolean remove(char key)
Char2BooleanMapremove in interface Char2BooleanMapkey - the element that should be removedpublic boolean removeOrDefault(char key,
boolean defaultValue)
Char2BooleanMapremoveOrDefault in interface Char2BooleanMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(char key,
boolean value)
Char2BooleanMapremove in interface Char2BooleanMapkey - 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<java.lang.Character,java.lang.Boolean>remove in interface Char2BooleanMapremove in class AbstractChar2BooleanMapkey - 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<java.lang.Character,java.lang.Boolean>remove in interface Char2BooleanMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(CharBooleanConsumer action)
Char2BooleanMapforEach in interface Char2BooleanMapforEach in class AbstractChar2BooleanMapaction - processor of the values that are iterator overpublic CharOrderedSet keySet()
keySet in interface java.util.Map<java.lang.Character,java.lang.Boolean>keySet in interface Char2BooleanMapkeySet in interface Char2BooleanOrderedMapkeySet in class AbstractChar2BooleanMappublic BooleanCollection values()
values in interface java.util.Map<java.lang.Character,java.lang.Boolean>values in interface Char2BooleanMapvalues in class AbstractChar2BooleanMappublic ObjectOrderedSet<Char2BooleanMap.Entry> char2BooleanEntrySet()
Char2BooleanMapchar2BooleanEntrySet in interface Char2BooleanMapchar2BooleanEntrySet in interface Char2BooleanOrderedMappublic boolean replace(char key,
boolean oldValue,
boolean newValue)
Char2BooleanMapreplace in interface Char2BooleanMapreplace in class AbstractChar2BooleanMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public boolean replace(char key,
boolean value)
Char2BooleanMapreplace in interface Char2BooleanMapreplace in class AbstractChar2BooleanMapkey - the element that should be searched forvalue - the value to replace with.public boolean computeBoolean(char key,
CharBooleanUnaryOperator mappingFunction)
Char2BooleanMapcomputeBoolean in interface Char2BooleanMapcomputeBoolean in class AbstractChar2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic boolean computeBooleanIfAbsent(char key,
Char2BooleanFunction mappingFunction)
Char2BooleanMapcomputeBooleanIfAbsent in interface Char2BooleanMapcomputeBooleanIfAbsent in class AbstractChar2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic boolean supplyBooleanIfAbsent(char key,
BooleanSupplier valueProvider)
Char2BooleanMapsupplyBooleanIfAbsent in interface Char2BooleanMapsupplyBooleanIfAbsent in class AbstractChar2BooleanMapkey - the key that should be computedvalueProvider - the value if not presentpublic boolean computeBooleanIfPresent(char key,
CharBooleanUnaryOperator mappingFunction)
Char2BooleanMapcomputeBooleanIfPresent in interface Char2BooleanMapcomputeBooleanIfPresent in class AbstractChar2BooleanMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic boolean mergeBoolean(char key,
boolean value,
BooleanBooleanUnaryOperator mappingFunction)
Char2BooleanMapmergeBoolean in interface Char2BooleanMapmergeBoolean in class AbstractChar2BooleanMapkey - 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(Char2BooleanMap m, BooleanBooleanUnaryOperator mappingFunction)
Char2BooleanMapmergeAllBoolean in interface Char2BooleanMapmergeAllBoolean in class AbstractChar2BooleanMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
size in interface java.util.Map<java.lang.Character,java.lang.Boolean>size in class java.util.AbstractMap<java.lang.Character,java.lang.Boolean>public void clear()
clear in interface java.util.Map<java.lang.Character,java.lang.Boolean>clear in class java.util.AbstractMap<java.lang.Character,java.lang.Boolean>public Char2BooleanArrayMap copy()
Char2BooleanMapcopy in interface Char2BooleanMapcopy in interface Char2BooleanOrderedMapcopy in class AbstractChar2BooleanMap