Package com.tangosol.util
Class WrapperCollections.AbstractWrapperMap<K,V>
- java.lang.Object
-
- com.tangosol.util.WrapperCollections.AbstractWrapperMap<K,V>
-
- All Implemented Interfaces:
Serializable,Map<K,V>
- Direct Known Subclasses:
WrapperCollections.AbstractWrapperSortedMap
- Enclosing class:
- WrapperCollections
public abstract static class WrapperCollections.AbstractWrapperMap<K,V> extends Object implements Map<K,V>, Serializable
Map implementation which delegates all calls to another Map.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<K,V>m_mapDelegateThe Map to which this wrapper delegates.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractWrapperMap()Default constructorprotectedAbstractWrapperMap(Map<K,V> map)Create an AbstractWrapperMap which delegates to the specified Map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Vcompute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)VcomputeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)VcomputeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)booleancontainsKey(Object oKey)booleancontainsValue(Object oValue)Set<Map.Entry<K,V>>entrySet()booleanequals(Object oOther)voidforEach(BiConsumer<? super K,? super V> action)Vget(Object oKey)protected Map<K,V>getDelegate()Return the Map to which all operations should be delegated to.VgetOrDefault(Object key, V defaultValue)inthashCode()booleanisEmpty()Set<K>keySet()Vmerge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)Vput(K oKey, V oValue)voidputAll(Map<? extends K,? extends V> map)VputIfAbsent(K key, V value)Vremove(Object oKey)booleanremove(Object key, Object value)Vreplace(K key, V value)booleanreplace(K key, V oldValue, V newValue)voidreplaceAll(BiFunction<? super K,? super V,? extends V> function)intsize()StringtoString()Collection<V>values()
-
-
-
Method Detail
-
getDelegate
protected Map<K,V> getDelegate()
Return the Map to which all operations should be delegated to.- Returns:
- the wrapped Map
-
containsKey
public boolean containsKey(Object oKey)
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object oValue)
- Specified by:
containsValuein interfaceMap<K,V>
-
getOrDefault
public V getOrDefault(Object key, V defaultValue)
- Specified by:
getOrDefaultin interfaceMap<K,V>
-
forEach
public void forEach(BiConsumer<? super K,? super V> action)
-
replaceAll
public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
- Specified by:
replaceAllin interfaceMap<K,V>
-
computeIfAbsent
public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
- Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfPresent
public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
- Specified by:
computeIfPresentin interfaceMap<K,V>
-
merge
public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
-
equals
public boolean equals(Object oOther)
-
hashCode
public int hashCode()
-
-