org.omnaest.utils.structure.map.decorator
Class MapDecorator<K,V>
java.lang.Object
org.omnaest.utils.structure.map.decorator.MapDecorator<K,V>
- All Implemented Interfaces:
- Serializable, Map<K,V>
- Direct Known Subclasses:
- CaseinsensitiveMapDecorator, JAXBMap, LockingMapDecorator
public class MapDecorator<K,V>
- extends Object
- implements Map<K,V>, Serializable
A decorator for any Map implementation
- Author:
- Omnaest
- See Also:
SortedMapDecorator,
Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
map
protected Map<K,V> map
MapDecorator
public MapDecorator(Map<K,V> map)
- Parameters:
map - - See Also:
MapDecorator
MapDecorator
protected MapDecorator()
- See Also:
MapDecorator
size
public int size()
- Specified by:
size in interface Map<K,V>
- Returns:
- See Also:
Map.size()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Map<K,V>
- Returns:
- See Also:
Map.isEmpty()
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface Map<K,V>
- Parameters:
key -
- Returns:
- See Also:
Map.containsKey(java.lang.Object)
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue in interface Map<K,V>
- Parameters:
value -
- Returns:
- See Also:
Map.containsValue(java.lang.Object)
get
public V get(Object key)
- Specified by:
get in interface Map<K,V>
- Parameters:
key -
- Returns:
- See Also:
Map.get(java.lang.Object)
put
public V put(K key,
V value)
- Specified by:
put in interface Map<K,V>
- Parameters:
key - value -
- Returns:
- See Also:
Map.put(java.lang.Object, java.lang.Object)
remove
public V remove(Object key)
- Specified by:
remove in interface Map<K,V>
- Parameters:
key -
- Returns:
- See Also:
Map.remove(java.lang.Object)
putAll
public void putAll(Map<? extends K,? extends V> m)
- Specified by:
putAll in interface Map<K,V>
- Parameters:
m - - See Also:
Map.putAll(java.util.Map)
clear
public void clear()
- Specified by:
clear in interface Map<K,V>
- See Also:
Map.clear()
keySet
public Set<K> keySet()
- Specified by:
keySet in interface Map<K,V>
- Returns:
- See Also:
Map.keySet()
values
public Collection<V> values()
- Specified by:
values in interface Map<K,V>
- Returns:
- See Also:
Map.values()
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface Map<K,V>
- Returns:
- See Also:
Map.entrySet()
equals
public boolean equals(Object obj)
- Specified by:
equals in interface Map<K,V>- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Map<K,V>- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
getMap
protected Map<K,V> getMap()
- Returns:
- the map
setMap
protected void setMap(Map<K,V> map)
- Parameters:
map - the map to set
Copyright © 2013. All Rights Reserved.