V - the type of elements maintained by this Collectionpublic class Char2ObjectArrayMap<V> extends AbstractChar2ObjectMap<V> implements Char2ObjectSortedMap<V>
AbstractChar2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Char2ObjectSortedMap.FastSortedSet<V>Char2ObjectMap.Entry<V>, Char2ObjectMap.FastEntrySet<V>| Constructor and Description |
|---|
Char2ObjectArrayMap()
Default Constructor
|
Char2ObjectArrayMap(char[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Char2ObjectArrayMap(char[] keys,
V[] values,
int length)
Helper constructor that allow to create a map from unboxed values
|
Char2ObjectArrayMap(Char2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Char2ObjectArrayMap(java.lang.Character[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Char2ObjectArrayMap(java.lang.Character[] keys,
V[] values,
int length)
Helper constructor that allow to create a map from boxed values (it will unbox them) with a custom length
|
Char2ObjectArrayMap(int minCapacity)
Constructor that defines the minimum capacity
|
Char2ObjectArrayMap(java.util.Map<? extends java.lang.Character,? extends V> 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 |
|---|---|
ObjectSortedSet<Char2ObjectMap.Entry<V>> |
char2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
clear() |
CharComparator |
comparator() |
V |
compute(char key,
CharObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(char key,
Char2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(char key,
CharObjectUnaryOperator<V> 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(java.lang.Object value) |
char |
firstCharKey()
A method to get the first Key of a Map.
|
V |
firstValue()
A method to get the first Value of a Map.
|
void |
forEach(CharObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getAndMoveToFirst(char key)
A Specific get method that allows to move teh given key/value int the first index.
|
V |
getAndMoveToLast(char key)
A Specific get method that allows to move teh given key/value int the last index.
|
V |
getObject(char key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(char key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
Char2ObjectSortedMap<V> |
headMap(char toKey)
A Type Specific HeadMap method to reduce boxing/unboxing
|
CharSet |
keySet() |
char |
lastCharKey()
A method to get the last Key of a Map.
|
V |
lastValue()
A method to get the last Value of a Map.
|
V |
merge(char key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Char2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
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.
|
V |
put(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putAndMoveToFirst(char key,
V value)
A customized put method that allows you to insert into the first index.
|
V |
putAndMoveToLast(char key,
V value)
A customized put method that allows you to insert into the last index.
|
V |
putIfAbsent(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remChar(char key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remCharOrDefault(char key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(char key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
V |
replace(char key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(char key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
int |
size() |
Char2ObjectSortedMap<V> |
subMap(char fromKey,
char toKey)
A Type Specific SubMap method to reduce boxing/unboxing
|
Char2ObjectSortedMap<V> |
tailMap(char fromKey)
A Type Specific TailMap method to reduce boxing/unboxing
|
ObjectCollection<V> |
values() |
entrySet, equals, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceObjects, replaceObjects, setDefaultReturnValuefirstKey, headMap, lastKey, subMap, tailMapcompute, computeIfAbsent, computeIfPresent, entrySet, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, replace, replace, replaceAll, replaceObjects, replaceObjects, setDefaultReturnValuepublic Char2ObjectArrayMap()
public Char2ObjectArrayMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Char2ObjectArrayMap(java.lang.Character[] keys,
V[] 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 Char2ObjectArrayMap(java.lang.Character[] keys,
V[] 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 Char2ObjectArrayMap(char[] keys,
V[] 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 Char2ObjectArrayMap(char[] keys,
V[] 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 Char2ObjectArrayMap(java.util.Map<? extends java.lang.Character,? extends V> map)
map - the values that should be present in the mappublic Char2ObjectArrayMap(Char2ObjectMap<V> map)
map - the values that should be present in the mappublic V put(char key, V value)
Char2ObjectMapput in interface Char2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(char key, V value)
Char2ObjectMapputIfAbsent in interface Char2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V putAndMoveToFirst(char key, V value)
Char2ObjectSortedMapputAndMoveToFirst in interface Char2ObjectSortedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public V putAndMoveToLast(char key, V value)
Char2ObjectSortedMapputAndMoveToLast in interface Char2ObjectSortedMap<V>key - the key that should be insertedvalue - the value that should be insertedMap.put(Object, Object)public boolean moveToFirst(char key)
Char2ObjectSortedMapmoveToFirst in interface Char2ObjectSortedMap<V>key - that should be moved to the first indexpublic boolean moveToLast(char key)
Char2ObjectSortedMapmoveToLast in interface Char2ObjectSortedMap<V>key - that should be moved to the first lastpublic boolean containsKey(char key)
Char2ObjectMapcontainsKey in interface Char2ObjectMap<V>containsKey in class AbstractChar2ObjectMap<V>key - element that is searched forpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,V>containsKey in interface Char2ObjectMap<V>containsKey in class java.util.AbstractMap<java.lang.Character,V>key - that is searched for.Map.containsKey(Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Character,V>containsValue in class AbstractChar2ObjectMap<V>public V getObject(char key)
Char2ObjectMapgetObject in interface Char2ObjectFunction<V>getObject in interface Char2ObjectMap<V>key - the key that is searched forpublic V getOrDefault(char key, V defaultValue)
Char2ObjectMapgetOrDefault in interface Char2ObjectMap<V>getOrDefault in class AbstractChar2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V getAndMoveToFirst(char key)
Char2ObjectSortedMapgetAndMoveToFirst in interface Char2ObjectSortedMap<V>key - that is searched forpublic V getAndMoveToLast(char key)
Char2ObjectSortedMapgetAndMoveToLast in interface Char2ObjectSortedMap<V>key - that is searched forpublic char firstCharKey()
Char2ObjectSortedMapfirstCharKey in interface Char2ObjectSortedMap<V>public char lastCharKey()
Char2ObjectSortedMaplastCharKey in interface Char2ObjectSortedMap<V>public V firstValue()
Char2ObjectSortedMapfirstValue in interface Char2ObjectSortedMap<V>public V lastValue()
Char2ObjectSortedMaplastValue in interface Char2ObjectSortedMap<V>public char pollFirstCharKey()
Char2ObjectSortedMappollFirstCharKey in interface Char2ObjectSortedMap<V>public char pollLastCharKey()
Char2ObjectSortedMappollLastCharKey in interface Char2ObjectSortedMap<V>public V remChar(char key)
Char2ObjectMapremChar in interface Char2ObjectMap<V>key - the element that should be removedpublic V remCharOrDefault(char key, V defaultValue)
Char2ObjectMapremCharOrDefault in interface Char2ObjectMap<V>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(char key,
V value)
Char2ObjectMapremove in interface Char2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Character,V>remove in interface Char2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Character,V>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<java.lang.Character,V>remove in interface Char2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public void forEach(CharObjectConsumer<V> action)
Char2ObjectMapforEach in interface Char2ObjectMap<V>forEach in class AbstractChar2ObjectMap<V>action - processor of the values that are iterator overpublic CharSet keySet()
keySet in interface java.util.Map<java.lang.Character,V>keySet in interface java.util.SortedMap<java.lang.Character,V>keySet in interface Char2ObjectMap<V>keySet in interface Char2ObjectSortedMap<V>keySet in class AbstractChar2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Character,V>values in interface java.util.SortedMap<java.lang.Character,V>values in interface Char2ObjectMap<V>values in interface Char2ObjectSortedMap<V>values in class AbstractChar2ObjectMap<V>public ObjectSortedSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet()
Char2ObjectMapchar2ObjectEntrySet in interface Char2ObjectMap<V>public boolean replace(char key,
V oldValue,
V newValue)
Char2ObjectMapreplace in interface Char2ObjectMap<V>replace in class AbstractChar2ObjectMap<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(char key, V value)
Char2ObjectMapreplace in interface Char2ObjectMap<V>replace in class AbstractChar2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public V compute(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcompute in interface Char2ObjectMap<V>compute in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(char key, Char2ObjectFunction<V> mappingFunction)
Char2ObjectMapcomputeIfAbsent in interface Char2ObjectMap<V>computeIfAbsent in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(char key, CharObjectUnaryOperator<V> mappingFunction)
Char2ObjectMapcomputeIfPresent in interface Char2ObjectMap<V>computeIfPresent in class AbstractChar2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(char key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmerge in interface Char2ObjectMap<V>merge in class AbstractChar2ObjectMap<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(Char2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Char2ObjectMapmergeAll in interface Char2ObjectMap<V>mergeAll in class AbstractChar2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()
public void clear()
public CharComparator comparator()
comparator in interface java.util.SortedMap<java.lang.Character,V>comparator in interface Char2ObjectSortedMap<V>public Char2ObjectSortedMap<V> subMap(char fromKey, char toKey)
Char2ObjectSortedMapsubMap in interface Char2ObjectSortedMap<V>fromKey - where the submap should starttoKey - where the subMap should endpublic Char2ObjectSortedMap<V> headMap(char toKey)
Char2ObjectSortedMapheadMap in interface Char2ObjectSortedMap<V>toKey - where the headMap should endpublic Char2ObjectSortedMap<V> tailMap(char fromKey)
Char2ObjectSortedMaptailMap in interface Char2ObjectSortedMap<V>fromKey - where the TailMap should start