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_mapDelegate
The Map to which this wrapper delegates.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractWrapperMap()
Default constructorprotected
AbstractWrapperMap(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 void
clear()
V
compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
V
computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
V
computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
boolean
containsKey(Object oKey)
boolean
containsValue(Object oValue)
Set<Map.Entry<K,V>>
entrySet()
boolean
equals(Object oOther)
void
forEach(BiConsumer<? super K,? super V> action)
V
get(Object oKey)
protected Map<K,V>
getDelegate()
Return the Map to which all operations should be delegated to.V
getOrDefault(Object key, V defaultValue)
int
hashCode()
boolean
isEmpty()
Set<K>
keySet()
V
merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
V
put(K oKey, V oValue)
void
putAll(Map<? extends K,? extends V> map)
V
putIfAbsent(K key, V value)
V
remove(Object oKey)
boolean
remove(Object key, Object value)
V
replace(K key, V value)
boolean
replace(K key, V oldValue, V newValue)
void
replaceAll(BiFunction<? super K,? super V,? extends V> function)
int
size()
String
toString()
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:
containsKey
in interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object oValue)
- Specified by:
containsValue
in interfaceMap<K,V>
-
getOrDefault
public V getOrDefault(Object key, V defaultValue)
- Specified by:
getOrDefault
in 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:
replaceAll
in interfaceMap<K,V>
-
computeIfAbsent
public V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
- Specified by:
computeIfAbsent
in interfaceMap<K,V>
-
computeIfPresent
public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
- Specified by:
computeIfPresent
in 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()
-
-