Class AbstractMapDecorator
- java.lang.Object
-
- org.apache.commons.collections.map.AbstractMapDecorator
-
- All Implemented Interfaces:
Map
- Direct Known Subclasses:
AbstractBidiMapDecorator
,AbstractOrderedMapDecorator
,AbstractSortedMapDecorator
,DefaultedMap
,FixedSizeMap
,LazyMap
,ListOrderedMap
,MultiValueMap
,PredicatedMap
,TransformedMap
,UnmodifiableMap
@Deprecated(since="2021-04-30") public abstract class AbstractMapDecorator extends Object implements Map
Deprecated.Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.Provides a base decorator that enables additional functionality to be added to a Map via decoration.Methods are forwarded directly to the decorated map.
This implementation does not perform any special processing with
entrySet()
,keySet()
orvalues()
. Instead it simply returns the set/collection from the wrapped map. This may be undesirable, for example if you are trying to write a validating implementation it would provide a loophole around the validation. But, you might want that loophole, so this class is kept simple.- Since:
- Commons Collections 3.0
-
-
Constructor Summary
Constructors Constructor Description AbstractMapDecorator(Map map)
Deprecated.Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.boolean
containsKey(Object key)
Deprecated.boolean
containsValue(Object value)
Deprecated.Set
entrySet()
Deprecated.boolean
equals(Object object)
Deprecated.Object
get(Object key)
Deprecated.int
hashCode()
Deprecated.boolean
isEmpty()
Deprecated.Set
keySet()
Deprecated.Object
put(Object key, Object value)
Deprecated.void
putAll(Map mapToCopy)
Deprecated.Object
remove(Object key)
Deprecated.int
size()
Deprecated.String
toString()
Deprecated.Collection
values()
Deprecated.-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
AbstractMapDecorator
public AbstractMapDecorator(Map map)
Deprecated.Constructor that wraps (not copies).- Parameters:
map
- the map to decorate, must not be null- Throws:
IllegalArgumentException
- if the collection is null
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
Deprecated.- Specified by:
containsKey
in interfaceMap
-
containsValue
public boolean containsValue(Object value)
Deprecated.- Specified by:
containsValue
in interfaceMap
-
values
public Collection values()
Deprecated.
-
equals
public boolean equals(Object object)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.
-
-