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 voidclear()Deprecated.booleancontainsKey(Object key)Deprecated.booleancontainsValue(Object value)Deprecated.SetentrySet()Deprecated.booleanequals(Object object)Deprecated.Objectget(Object key)Deprecated.inthashCode()Deprecated.booleanisEmpty()Deprecated.SetkeySet()Deprecated.Objectput(Object key, Object value)Deprecated.voidputAll(Map mapToCopy)Deprecated.Objectremove(Object key)Deprecated.intsize()Deprecated.StringtoString()Deprecated.Collectionvalues()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:
containsKeyin interfaceMap
-
containsValue
public boolean containsValue(Object value)
Deprecated.- Specified by:
containsValuein interfaceMap
-
values
public Collection values()
Deprecated.
-
equals
public boolean equals(Object object)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.
-
-