V - the type of elements maintained by this Collectionpublic interface Char2ObjectMap<V> extends java.util.Map<java.lang.Character,V>, Char2ObjectFunction<V>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Char2ObjectMap.BuilderCache<V>
Builder Cache for allowing to buildMaps
|
static interface |
Char2ObjectMap.Entry<V>
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Char2ObjectMap.FastEntrySet<V>
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
static class |
Char2ObjectMap.MapBuilder
Helper class that reduces the method spam of the Map Class.
|
| Modifier and Type | Method and Description |
|---|---|
static Char2ObjectMap.MapBuilder |
builder()
Helper Class that allows to create Maps without requiring a to type out the entire implementation or know it.
|
ObjectSet<Char2ObjectMap.Entry<V>> |
char2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
default V |
compute(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
compute(char key,
CharObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default V |
computeIfAbsent(java.lang.Character key,
java.util.function.Function<? super java.lang.Character,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfAbsent(char key,
Char2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default V |
computeIfPresent(java.lang.Character key,
java.util.function.BiFunction<? super java.lang.Character,? super V,? extends V> mappingFunction)
Deprecated.
|
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
|
default boolean |
containsKey(java.lang.Object key) |
Char2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Character,V>> |
entrySet()
Deprecated.
|
default void |
forEach(java.util.function.BiConsumer<? super java.lang.Character,? super V> action)
Deprecated.
|
void |
forEach(CharObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(char key)
A Type Specific get method to reduce boxing/unboxing
|
default V |
get(java.lang.Object key)
Deprecated.
|
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(char key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
default V |
getOrDefault(java.lang.Object key,
V defaultValue)
Deprecated.
|
CharSet |
keySet() |
default V |
merge(java.lang.Character key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
Deprecated.
|
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.
|
default V |
put(java.lang.Character key,
V value)
Deprecated.
|
V |
put(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
default void |
putAll(char[] keys,
V[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(char[] 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(Char2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
default void |
putAll(java.lang.Character[] keys,
V[] values)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(java.lang.Character[] 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 |
putAllIfAbsent(Char2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
default V |
putIfAbsent(java.lang.Character key,
V value)
Deprecated.
|
V |
putIfAbsent(char key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remove(char key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(char key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
default V |
remove(java.lang.Object key) |
default boolean |
remove(java.lang.Object key,
java.lang.Object value) |
V |
removeOrDefault(char key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
default V |
replace(java.lang.Character key,
V value)
Deprecated.
|
default boolean |
replace(java.lang.Character key,
V oldValue,
V newValue)
Deprecated.
|
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
|
default void |
replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super V,? extends V> mappingFunction)
Deprecated.
|
void |
replaceObjects(Char2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(CharObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
Char2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(char key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
default Char2ObjectMap<V> |
synchronize()
Creates a Wrapped Map that is Synchronized
|
default Char2ObjectMap<V> |
synchronize(java.lang.Object mutex)
Creates a Wrapped Map that is Synchronized
|
default Char2ObjectMap<V> |
unmodifiable()
Creates a Wrapped Map that is unmodifiable
|
ObjectCollection<V> |
values() |
static Char2ObjectMap.MapBuilder builder()
V getDefaultReturnValue()
Char2ObjectMap<V> setDefaultReturnValue(V v)
v - value that should be the default return valueChar2ObjectMap<V> copy()
V put(char key, V value)
key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)default void putAll(char[] keys,
V[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(char[] keys,
V[] values,
int offset,
int size)
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 addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)default void putAll(java.lang.Character[] keys,
V[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(java.lang.Character[] keys,
V[] values,
int offset,
int size)
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 addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)V putIfAbsent(char key, V value)
key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)void putAllIfAbsent(Char2ObjectMap<V> m)
m - elements that should be added if not present.void putAll(Char2ObjectMap<V> m)
m - the elements that should be insertedboolean containsKey(char key)
key - element that is searched fordefault boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Character,V>key - that is searched for.Map.containsKey(Object)V remove(char key)
key - the element that should be removeddefault V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Character,V>key - the element that should be removedMap.remove(Object)boolean remove(char key,
V value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)default boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Character,V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)V removeOrDefault(char key, V defaultValue)
key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)boolean replace(char key,
V oldValue,
V newValue)
key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.V replace(char key, V value)
key - the element that should be searched forvalue - the value to replace with.void replaceObjects(Char2ObjectMap<V> m)
m - elements that should be replaced.void replaceObjects(CharObjectUnaryOperator<V> mappingFunction)
mappingFunction - operation to replace all valuesV compute(char key, CharObjectUnaryOperator<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valueV computeIfAbsent(char key, Char2ObjectFunction<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentV supplyIfAbsent(char key, ObjectSupplier<V> valueProvider)
key - the key that should be computedvalueProvider - the value if not presentV computeIfPresent(char key, CharObjectUnaryOperator<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentV merge(char key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuevoid mergeAll(Char2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Value@Deprecated
default boolean replace(java.lang.Character key,
V oldValue,
V newValue)
replace in interface java.util.Map<java.lang.Character,V>@Deprecated default V replace(java.lang.Character key, V value)
replace in interface java.util.Map<java.lang.Character,V>V get(char key)
get in interface Char2ObjectFunction<V>key - the key that is searched forV getOrDefault(char key, V defaultValue)
key - the key that is searched fordefaultValue - the value that should be returned if the key is not present@Deprecated default V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Character,V>@Deprecated default V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Character,V>@Deprecated default void replaceAll(java.util.function.BiFunction<? super java.lang.Character,? super V,? extends V> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Character,V>@Deprecated default V compute(java.lang.Character key, java.util.function.BiFunction<? super java.lang.Character,? super V,? extends V> mappingFunction)
compute in interface java.util.Map<java.lang.Character,V>@Deprecated default V computeIfAbsent(java.lang.Character key, java.util.function.Function<? super java.lang.Character,? extends V> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Character,V>@Deprecated default V computeIfPresent(java.lang.Character key, java.util.function.BiFunction<? super java.lang.Character,? super V,? extends V> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Character,V>@Deprecated default V merge(java.lang.Character key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
merge in interface java.util.Map<java.lang.Character,V>void forEach(CharObjectConsumer<V> action)
action - processor of the values that are iterator over@Deprecated default void forEach(java.util.function.BiConsumer<? super java.lang.Character,? super V> action)
forEach in interface java.util.Map<java.lang.Character,V>ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Character,V>@Deprecated ObjectSet<java.util.Map.Entry<java.lang.Character,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Character,V>ObjectSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet()
default Char2ObjectMap<V> synchronize()
Char2ObjectMaps.synchronize(speiger.src.collections.chars.maps.interfaces.Char2ObjectMap<V>)default Char2ObjectMap<V> synchronize(java.lang.Object mutex)
mutex - is the controller of the synchronization blockChar2ObjectMaps.synchronize(speiger.src.collections.chars.maps.interfaces.Char2ObjectMap<V>)default Char2ObjectMap<V> unmodifiable()
Char2ObjectMaps.unmodifiable(speiger.src.collections.chars.maps.interfaces.Char2ObjectMap<V>)@Deprecated default V put(java.lang.Character key, V value)
put in interface java.util.Map<java.lang.Character,V>