org.jboss.webbeans.util.collections
Class ForwardingConcurrentMap<K,V>
java.lang.Object
org.jboss.webbeans.util.collections.ForwardingObject
org.jboss.webbeans.util.collections.ForwardingMap<K,V>
org.jboss.webbeans.util.collections.ForwardingConcurrentMap<K,V>
- All Implemented Interfaces:
- java.util.concurrent.ConcurrentMap<K,V>, java.util.Map<K,V>
- Direct Known Subclasses:
- ConcurrentListHashMultiMap, ConcurrentSetHashMultiMap
public abstract class ForwardingConcurrentMap<K,V>
- extends ForwardingMap<K,V>
- implements java.util.concurrent.ConcurrentMap<K,V>
A concurrent map which forwards all its method calls to another concurrent
map. Subclasses should override one or more methods to modify the behavior of
the backing map as desired per the decorator pattern.
- Author:
- Charles Fry
- See Also:
ForwardingObject
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Method Summary |
protected abstract java.util.concurrent.ConcurrentMap<K,V> |
delegate()
Returns the backing delegate instance that methods are forwarded to. |
V |
putIfAbsent(K key,
V value)
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
|
V |
replace(K key,
V value)
|
boolean |
replace(K key,
V oldValue,
V newValue)
|
Methods inherited from class org.jboss.webbeans.util.collections.ForwardingMap |
clear, containsKey, containsValue, createEntrySet, createKeySet, createValues, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
ForwardingConcurrentMap
public ForwardingConcurrentMap()
delegate
protected abstract java.util.concurrent.ConcurrentMap<K,V> delegate()
- Description copied from class:
ForwardingObject
- Returns the backing delegate instance that methods are forwarded to.
Abstract subclasses generally override the
ForwardingObject
method
with an abstract method that has a more specific return type, such as
ForwardingSet.delegate()
. Concrete subclasses override this method
to supply the instance being decorated.
- Specified by:
delegate
in class ForwardingMap<K,V>
putIfAbsent
public V putIfAbsent(K key,
V value)
- Specified by:
putIfAbsent
in interface java.util.concurrent.ConcurrentMap<K,V>
remove
public boolean remove(java.lang.Object key,
java.lang.Object value)
- Specified by:
remove
in interface java.util.concurrent.ConcurrentMap<K,V>
replace
public V replace(K key,
V value)
- Specified by:
replace
in interface java.util.concurrent.ConcurrentMap<K,V>
replace
public boolean replace(K key,
V oldValue,
V newValue)
- Specified by:
replace
in interface java.util.concurrent.ConcurrentMap<K,V>
Copyright © 2011. All Rights Reserved.