Package com.identityworksllc.iiq.common
Interface DelegatedMap<K,V>
-
- Type Parameters:
K
- The key typeV
- The value type
- All Superinterfaces:
Map<K,V>
- All Known Subinterfaces:
DelegatedConcurrentMap<K,V>
- All Known Implementing Classes:
TypeFriendlyDelegatedConcurrentMap
,TypeFriendlyDelegatedMap
public interface DelegatedMap<K,V> extends Map<K,V>
A Map interface that delegates all calls by default to the contained Map.This is useful for situations where the implementation of the Map is the new behavior, not the implementation of the individual methods.
The delegate Map is whatever is returned from
getDelegate()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clear()
default boolean
containsKey(Object key)
default boolean
containsValue(Object value)
default Set<Map.Entry<K,V>>
entrySet()
default V
get(Object key)
Map<K,V>
getDelegate()
Gets the map to which all otherMap
calls are delegateddefault boolean
isEmpty()
default Set<K>
keySet()
default V
put(K key, V value)
default void
putAll(Map<? extends K,? extends V> m)
default V
remove(Object key)
default int
size()
default Collection<V>
values()
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
containsKey
default boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
-
containsValue
default boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<K,V>
-
getDelegate
Map<K,V> getDelegate()
Gets the map to which all otherMap
calls are delegated- Returns:
- The Map to which all calls are delegated
-
-