T - the type of elements maintained by this Collectionpublic class Object2CharArrayMap<T> extends AbstractObject2CharMap<T> implements Object2CharSortedMap<T>
AbstractObject2CharMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2CharSortedMap.FastSortedSet<T>Object2CharMap.Entry<T>, Object2CharMap.FastEntrySet<T>| Constructor and Description |
|---|
Object2CharArrayMap()
Default Constructor
|
Object2CharArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Object2CharArrayMap(java.util.Map<? extends T,? extends java.lang.Character> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Object2CharArrayMap(Object2CharMap<T> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Object2CharArrayMap(T[] keys,
char[] values)
Helper constructor that allow to create a map from unboxed values
|
Object2CharArrayMap(T[] keys,
char[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Object2CharArrayMap(T[] keys,
java.lang.Character[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Object2CharArrayMap(T[] keys,
java.lang.Character[] 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 |
|---|---|
char |
addTo(T key,
char value)
A Helper method to add a primitives together.
|
void |
clear() |
java.util.Comparator<T> |
comparator() |
char |
computeChar(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfAbsent(T key,
Object2CharFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
char |
computeCharIfPresent(T key,
ObjectCharUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(char value)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
char |
firstCharValue()
A method to get the first Value of a Map.
|
T |
firstKey() |
void |
forEach(ObjectCharConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
char |
getAndMoveToFirst(T key)
A Specific get method that allows to move teh given key/value int the first index.
|
char |
getAndMoveToLast(T key)
A Specific get method that allows to move teh given key/value int the last index.
|
char |
getChar(T key)
A Type Specific get method to reduce boxing/unboxing
|
char |
getOrDefault(java.lang.Object key,
char defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Object2CharSortedMap<T> |
headMap(T toKey) |
ObjectSet<T> |
keySet() |
char |
lastCharValue()
A method to get the last Value of a Map.
|
T |
lastKey() |
void |
mergeAllChar(Object2CharMap<T> m,
CharCharUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
char |
mergeChar(T key,
char value,
CharCharUnaryOperator 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.
|
ObjectSortedSet<Object2CharMap.Entry<T>> |
object2CharEntrySet()
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.
|
char |
put(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
putAndMoveToFirst(T key,
char value)
A customized put method that allows you to insert into the first index.
|
char |
putAndMoveToLast(T key,
char value)
A customized put method that allows you to insert into the last index.
|
char |
putIfAbsent(T key,
char value)
Type Specific method to reduce boxing/unboxing of values
|
char |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
char |
remOrDefault(T key,
char defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
java.lang.Character |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
boolean |
remove(T key,
char value)
Type Specific remove function to reduce boxing/unboxing
|
char |
replace(T key,
char value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
char oldValue,
char newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
Object2CharSortedMap<T> |
subMap(T fromKey,
T toKey) |
Object2CharSortedMap<T> |
tailMap(T fromKey) |
CharCollection |
values() |
addToAll, entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceChars, replaceChars, setDefaultReturnValueaddToAll, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceChars, replaceChars, setDefaultReturnValuepublic Object2CharArrayMap()
public Object2CharArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Object2CharArrayMap(T[] keys, java.lang.Character[] 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 Object2CharArrayMap(T[] keys, java.lang.Character[] 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 Object2CharArrayMap(T[] keys, char[] 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 Object2CharArrayMap(T[] keys, char[] 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 Object2CharArrayMap(java.util.Map<? extends T,? extends java.lang.Character> map)
map - the values that should be present in the mappublic Object2CharArrayMap(Object2CharMap<T> map)
map - the values that should be present in the mappublic char put(T key, char value)
Object2CharMapput in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public char putIfAbsent(T key, char value)
Object2CharMapputIfAbsent in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public char addTo(T key, char value)
Object2CharMapaddTo in interface Object2CharMap<T>key - the key that should be inserted,value - the value that should be inserted / addedpublic char putAndMoveToFirst(T key, char value)
Object2CharSortedMapputAndMoveToFirst in interface Object2CharSortedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public char putAndMoveToLast(T key, char value)
Object2CharSortedMapputAndMoveToLast in interface Object2CharSortedMap<T>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(T key)
Object2CharSortedMapmoveToFirst in interface Object2CharSortedMap<T>key - that should be moved to the first indexpublic boolean moveToLast(T key)
Object2CharSortedMapmoveToLast in interface Object2CharSortedMap<T>key - that should be moved to the first lastpublic boolean containsValue(char value)
Object2CharMapcontainsValue in interface Object2CharMap<T>containsValue in class AbstractObject2CharMap<T>value - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<T,java.lang.Character>containsKey in class AbstractObject2CharMap<T>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<T,java.lang.Character>containsValue in interface Object2CharMap<T>containsValue in class java.util.AbstractMap<T,java.lang.Character>value - that is searched for.Map.containsValue(Object)public char getChar(T key)
Object2CharMapgetChar in interface Object2CharFunction<T>getChar in interface Object2CharMap<T>key - the key that is searched forpublic char getOrDefault(java.lang.Object key,
char defaultValue)
Object2CharMapgetOrDefault in interface Object2CharMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic char getAndMoveToFirst(T key)
Object2CharSortedMapgetAndMoveToFirst in interface Object2CharSortedMap<T>key - that is searched forpublic char getAndMoveToLast(T key)
Object2CharSortedMapgetAndMoveToLast in interface Object2CharSortedMap<T>key - that is searched forpublic T firstKey()
firstKey in interface java.util.SortedMap<T,java.lang.Character>public T lastKey()
lastKey in interface java.util.SortedMap<T,java.lang.Character>public char firstCharValue()
Object2CharSortedMapfirstCharValue in interface Object2CharSortedMap<T>public char lastCharValue()
Object2CharSortedMaplastCharValue in interface Object2CharSortedMap<T>public T pollFirstKey()
Object2CharSortedMappollFirstKey in interface Object2CharSortedMap<T>public T pollLastKey()
Object2CharSortedMappollLastKey in interface Object2CharSortedMap<T>public char rem(T key)
Object2CharMaprem in interface Object2CharMap<T>key - the element that should be removedpublic char remOrDefault(T key, char defaultValue)
Object2CharMapremOrDefault in interface Object2CharMap<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, char value)
Object2CharMapremove in interface Object2CharMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public java.lang.Character remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Character>remove in interface Object2CharMap<T>remove in class java.util.AbstractMap<T,java.lang.Character>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.Character>remove in interface Object2CharMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(ObjectCharConsumer<T> action)
Object2CharMapforEach in interface Object2CharMap<T>forEach in class AbstractObject2CharMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Character>keySet in interface java.util.SortedMap<T,java.lang.Character>keySet in interface Object2CharMap<T>keySet in interface Object2CharSortedMap<T>keySet in class AbstractObject2CharMap<T>public CharCollection values()
values in interface java.util.Map<T,java.lang.Character>values in interface java.util.SortedMap<T,java.lang.Character>values in interface Object2CharMap<T>values in interface Object2CharSortedMap<T>values in class AbstractObject2CharMap<T>public ObjectSortedSet<Object2CharMap.Entry<T>> object2CharEntrySet()
Object2CharMapobject2CharEntrySet in interface Object2CharMap<T>public boolean replace(T key, char oldValue, char newValue)
Object2CharMapreplace in interface Object2CharMap<T>replace in class AbstractObject2CharMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public char replace(T key, char value)
Object2CharMapreplace in interface Object2CharMap<T>replace in class AbstractObject2CharMap<T>key - the element that should be searched forvalue - the value to replace with.public char computeChar(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeChar in interface Object2CharMap<T>computeChar in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic char computeCharIfAbsent(T key, Object2CharFunction<T> mappingFunction)
Object2CharMapcomputeCharIfAbsent in interface Object2CharMap<T>computeCharIfAbsent in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic char computeCharIfPresent(T key, ObjectCharUnaryOperator<T> mappingFunction)
Object2CharMapcomputeCharIfPresent in interface Object2CharMap<T>computeCharIfPresent in class AbstractObject2CharMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic char mergeChar(T key, char value, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeChar in interface Object2CharMap<T>mergeChar in class AbstractObject2CharMap<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 mergeAllChar(Object2CharMap<T> m, CharCharUnaryOperator mappingFunction)
Object2CharMapmergeAllChar in interface Object2CharMap<T>mergeAllChar in class AbstractObject2CharMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
public void clear()
public java.util.Comparator<T> comparator()
comparator in interface java.util.SortedMap<T,java.lang.Character>comparator in interface Object2CharSortedMap<T>public Object2CharSortedMap<T> subMap(T fromKey, T toKey)
subMap in interface java.util.SortedMap<T,java.lang.Character>subMap in interface Object2CharSortedMap<T>public Object2CharSortedMap<T> headMap(T toKey)
headMap in interface java.util.SortedMap<T,java.lang.Character>headMap in interface Object2CharSortedMap<T>public Object2CharSortedMap<T> tailMap(T fromKey)
tailMap in interface java.util.SortedMap<T,java.lang.Character>tailMap in interface Object2CharSortedMap<T>