T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic interface Object2ObjectMap<T,V> extends java.util.Map<T,V>, Object2ObjectFunction<T,V>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Object2ObjectMap.Entry<T,V>
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Object2ObjectMap.FastEntrySet<T,V>
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
| Modifier and Type | Method and Description |
|---|---|
default V |
compute(T key,
java.util.function.BiFunction<? super T,? super V,? extends V> mappingFunction) |
V |
compute(T key,
ObjectObjectUnaryOperator<T,V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default V |
computeIfAbsent(T key,
java.util.function.Function<? super T,? extends V> mappingFunction) |
V |
computeIfAbsent(T key,
Object2ObjectFunction<T,V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default V |
computeIfPresent(T key,
java.util.function.BiFunction<? super T,? super V,? extends V> mappingFunction) |
V |
computeIfPresent(T key,
ObjectObjectUnaryOperator<T,V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
ObjectSet<java.util.Map.Entry<T,V>> |
entrySet() |
default void |
forEach(java.util.function.BiConsumer<? super T,? super V> action) |
void |
forEach(ObjectObjectConsumer<T,V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
ObjectSet<T> |
keySet() |
default V |
merge(T key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction) |
V |
merge(T key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Object2ObjectMap<T,V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
ObjectSet<Object2ObjectMap.Entry<T,V>> |
object2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
V |
put(T key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(Object2ObjectMap<T,V> m)
Type Specific function for the bull putting of values
|
default void |
putAll(T[] keys,
V[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(T[] 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 |
putAllIfAbsent(Object2ObjectMap<T,V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
putIfAbsent(T key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remOrDefault(T key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
default V |
remove(java.lang.Object key) |
V |
replace(T key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
default void |
replaceAll(java.util.function.BiFunction<? super T,? super V,? extends V> mappingFunction) |
void |
replaceObjects(Object2ObjectMap<T,V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(ObjectObjectUnaryOperator<T,V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
Object2ObjectMap<T,V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
ObjectCollection<V> |
values() |
clear, containsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, putAll, remove, sizeapply, getObjectV getDefaultReturnValue()
Object2ObjectMap<T,V> setDefaultReturnValue(V v)
v - value that should be the default return valuedefault void putAll(T[] 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(T[] 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)void putAllIfAbsent(Object2ObjectMap<T,V> m)
m - elements that should be added if not present.void putAll(Object2ObjectMap<T,V> m)
m - the elements that should be insertedV rem(T key)
key - the element that should be removeddefault V remove(java.lang.Object key)
V remOrDefault(T 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(T key, V oldValue, V newValue)
replace in interface java.util.Map<T,V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.V replace(T key, V value)
void replaceObjects(Object2ObjectMap<T,V> m)
m - elements that should be replaced.void replaceObjects(ObjectObjectUnaryOperator<T,V> mappingFunction)
mappingFunction - operation to replace all valuesV compute(T key, ObjectObjectUnaryOperator<T,V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valueV computeIfAbsent(T key, Object2ObjectFunction<T,V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentV computeIfPresent(T key, ObjectObjectUnaryOperator<T,V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentV merge(T 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(Object2ObjectMap<T,V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuedefault void replaceAll(java.util.function.BiFunction<? super T,? super V,? extends V> mappingFunction)
default V compute(T key, java.util.function.BiFunction<? super T,? super V,? extends V> mappingFunction)
default V computeIfAbsent(T key, java.util.function.Function<? super T,? extends V> mappingFunction)
default V computeIfPresent(T key, java.util.function.BiFunction<? super T,? super V,? extends V> mappingFunction)
default V merge(T key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
void forEach(ObjectObjectConsumer<T,V> action)
action - processor of the values that are iterator overObjectCollection<V> values()
ObjectSet<Object2ObjectMap.Entry<T,V>> object2ObjectEntrySet()