T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic abstract class AbstractObject2ObjectMap<T,V> extends java.util.AbstractMap<T,V> implements Object2ObjectMap<T,V>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2ObjectMap.BasicEntry<T,V>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ObjectMap.Entry<T,V>, Object2ObjectMap.FastEntrySet<T,V>| Constructor and Description |
|---|
AbstractObject2ObjectMap() |
| Modifier and Type | Method and Description |
|---|---|
V |
compute(T key,
ObjectObjectUnaryOperator<T,V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(T key,
Object2ObjectFunction<T,V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(T key,
ObjectObjectUnaryOperator<T,V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
ObjectSet<java.util.Map.Entry<T,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectObjectConsumer<T,V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
ObjectSet<T> |
keySet() |
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.
|
void |
putAll(java.util.Map<? extends T,? extends V> m) |
void |
putAll(Object2ObjectMap<T,V> m)
Type Specific function for the bull putting of values
|
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 |
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
|
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
|
AbstractObject2ObjectMap<T,V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
ObjectCollection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, merge, object2ObjectEntrySet, put, putAll, putIfAbsent, rem, remOrDefault, remove, replaceAllapply, getObjectpublic V getDefaultReturnValue()
Object2ObjectMapgetDefaultReturnValue in interface Object2ObjectMap<T,V>public AbstractObject2ObjectMap<T,V> setDefaultReturnValue(V v)
Object2ObjectMapsetDefaultReturnValue in interface Object2ObjectMap<T,V>v - value that should be the default return valuepublic void putAll(Object2ObjectMap<T,V> m)
Object2ObjectMapputAll in interface Object2ObjectMap<T,V>m - the elements that should be insertedpublic void putAll(T[] keys, V[] values, int offset, int size)
Object2ObjectMapputAll in interface Object2ObjectMap<T,V>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 addedMap.putAll(Map)public void putAllIfAbsent(Object2ObjectMap<T,V> m)
Object2ObjectMapputAllIfAbsent in interface Object2ObjectMap<T,V>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public boolean replace(T key, V oldValue, V newValue)
Object2ObjectMapreplace in interface java.util.Map<T,V>replace in interface Object2ObjectMap<T,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(T key, V value)
Object2ObjectMappublic void replaceObjects(Object2ObjectMap<T,V> m)
Object2ObjectMapreplaceObjects in interface Object2ObjectMap<T,V>m - elements that should be replaced.public void replaceObjects(ObjectObjectUnaryOperator<T,V> mappingFunction)
Object2ObjectMapreplaceObjects in interface Object2ObjectMap<T,V>mappingFunction - operation to replace all valuespublic V compute(T key, ObjectObjectUnaryOperator<T,V> mappingFunction)
Object2ObjectMapcompute in interface Object2ObjectMap<T,V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(T key, Object2ObjectFunction<T,V> mappingFunction)
Object2ObjectMapcomputeIfAbsent in interface Object2ObjectMap<T,V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(T key, ObjectObjectUnaryOperator<T,V> mappingFunction)
Object2ObjectMapcomputeIfPresent in interface Object2ObjectMap<T,V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(T key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Object2ObjectMapmerge in interface Object2ObjectMap<T,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(Object2ObjectMap<T,V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Object2ObjectMapmergeAll in interface Object2ObjectMap<T,V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V get(java.lang.Object key)
public void forEach(ObjectObjectConsumer<T,V> action)
Object2ObjectMapforEach in interface Object2ObjectMap<T,V>action - processor of the values that are iterator overpublic ObjectCollection<V> values()
public boolean equals(java.lang.Object o)