T - the type of elements maintained by this CollectionV - the type of elements maintained by this Collectionpublic static class Object2ObjectMaps.UnmodifyableMap<T,V> extends AbstractObject2ObjectMap<T,V> implements Object2ObjectMap<T,V>
AbstractObject2ObjectMap.BasicEntry<T,V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ObjectMap.BuilderCache<T,V>, Object2ObjectMap.Entry<T,V>, Object2ObjectMap.FastEntrySet<T,V>, Object2ObjectMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
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
|
Object2ObjectMap<T,V> |
copy()
A Function that does a shallow clone of the Map itself.
|
V |
getObject(T key)
Type Specific get function to reduce boxing/unboxing
|
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.
|
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
|
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.
|
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
|
V |
supplyIfAbsent(T key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuebuilder, compute, computeIfAbsent, computeIfPresent, entrySet, forEach, forEach, getDefaultReturnValue, merge, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablecontainsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, putAll, remove, sizeapplypublic V put(T key, V value)
Object2ObjectMapput in interface java.util.Map<T,V>put in interface Object2ObjectMap<T,V>put in class java.util.AbstractMap<T,V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(T key, V value)
Object2ObjectMapputIfAbsent in interface java.util.Map<T,V>putIfAbsent in interface Object2ObjectMap<T,V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V rem(T key)
Object2ObjectMaprem in interface Object2ObjectMap<T,V>key - the element that should be removedpublic V remOrDefault(T key, V defaultValue)
Object2ObjectMapremOrDefault in interface Object2ObjectMap<T,V>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public V getObject(T key)
Object2ObjectFunctiongetObject in interface Object2ObjectFunction<T,V>key - the value that should be processedpublic V compute(T key, ObjectObjectUnaryOperator<T,V> mappingFunction)
Object2ObjectMapcompute in interface Object2ObjectMap<T,V>compute in class AbstractObject2ObjectMap<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>computeIfAbsent in class AbstractObject2ObjectMap<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>computeIfPresent in class AbstractObject2ObjectMap<T,V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V supplyIfAbsent(T key, ObjectSupplier<V> valueProvider)
Object2ObjectMapsupplyIfAbsent in interface Object2ObjectMap<T,V>supplyIfAbsent in class AbstractObject2ObjectMap<T,V>key - the key that should be computedvalueProvider - the value if not presentpublic V merge(T key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Object2ObjectMapmerge in interface Object2ObjectMap<T,V>merge in class AbstractObject2ObjectMap<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>mergeAll in class AbstractObject2ObjectMap<T,V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceObjects(ObjectObjectUnaryOperator<T,V> mappingFunction)
Object2ObjectMapreplaceObjects in interface Object2ObjectMap<T,V>replaceObjects in class AbstractObject2ObjectMap<T,V>mappingFunction - operation to replace all valuespublic void replaceObjects(Object2ObjectMap<T,V> m)
Object2ObjectMapreplaceObjects in interface Object2ObjectMap<T,V>replaceObjects in class AbstractObject2ObjectMap<T,V>m - elements that should be replaced.public Object2ObjectMap<T,V> copy()
Object2ObjectMapcopy in interface Object2ObjectMap<T,V>copy in class AbstractObject2ObjectMap<T,V>public void clear()
public ObjectSet<T> keySet()
keySet in interface java.util.Map<T,V>keySet in interface Object2ObjectMap<T,V>keySet in class AbstractObject2ObjectMap<T,V>public ObjectCollection<V> values()
values in interface java.util.Map<T,V>values in interface Object2ObjectMap<T,V>values in class AbstractObject2ObjectMap<T,V>public ObjectSet<Object2ObjectMap.Entry<T,V>> object2ObjectEntrySet()
Object2ObjectMapobject2ObjectEntrySet in interface Object2ObjectMap<T,V>