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:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionThe Map to which this wrapper delegates. -
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructorprotected
AbstractWrapperMap
(Map<K, V> map) Create an AbstractWrapperMap which delegates to the specified Map. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
computeIfAbsent
(K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) boolean
containsKey
(Object oKey) boolean
containsValue
(Object oValue) entrySet()
boolean
void
forEach
(BiConsumer<? super K, ? super V> action) Return the Map to which all operations should be delegated to.getOrDefault
(Object key, V defaultValue) int
hashCode()
boolean
isEmpty()
keySet()
void
putIfAbsent
(K key, V value) boolean
boolean
void
replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) int
size()
toString()
values()
-
Field Details
-
m_mapDelegate
The Map to which this wrapper delegates.
-
-
Constructor Details
-
AbstractWrapperMap
protected AbstractWrapperMap()Default constructor -
AbstractWrapperMap
Create an AbstractWrapperMap which delegates to the specified Map.- Parameters:
map
- the Map to delegate all calls to
-
-
Method Details
-
getDelegate
Return the Map to which all operations should be delegated to.- Returns:
- the wrapped Map
-
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<K,
V>
-
forEach
-
replace
-
replace
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<K,
V>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceMap<K,
V>
-
computeIfPresent
- Specified by:
computeIfPresent
in interfaceMap<K,
V>
-
compute
-
merge
-
equals
-
hashCode
public int hashCode() -
toString
-