- java.lang.Object
-
- org.omnifaces.util.MapWrapper<K,V>
-
- Type Parameters:
K
- the type of keys maintained by this mapV
- the type of mapped values
- All Implemented Interfaces:
Serializable
,Map<K,V>
- Direct Known Subclasses:
ImportConstants.ConstantsMap
public class MapWrapper<K,V> extends Object implements Map<K,V>, Serializable
Implementation of Map that wraps another map. This allows interception of one or more method on this wrapped map.This class is not listed in showcase! Should I use it?
This class is indeed intented for internal usage only. We won't add methods here on user request. We only add methods here once we encounter non-DRY code in OmniFaces codebase. The methods may be renamed/changed without notice.
We don't stop you from using it if you found it in the Javadoc and you think you find it useful, but you have to accept the risk that the method signatures can be changed without notice. This utility class exists because OmniFaces intends to be free of 3rd party dependencies.
- Author:
- Arjan Tijms
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapWrapper(Map<K,V> map)
Initializes the wrapper with its wrapped map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<K,V>>
entrySet()
boolean
equals(Object object)
V
get(Object key)
Map<K,V>
getWrapped()
int
hashCode()
boolean
isEmpty()
Set<K>
keySet()
V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> m)
V
remove(Object key)
int
size()
String
toString()
Collection<V>
values()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<K,V>
-
equals
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
-