Known Direct Subclasses
AbstractBidiMapDecorator,
AbstractOrderedMapDecorator,
AbstractSortedMapDecorator,
DefaultedMap,
FixedSizeMap,
LazyMap,
ListOrderedMap,
MultiValueMap,
PredicatedMap,
TransformedMap,
UnmodifiableMap
AbstractBidiMapDecorator |
Provides a base decorator that enables additional functionality to be added
to a BidiMap via decoration. |
AbstractOrderedMapDecorator |
Provides a base decorator that enables additional functionality to be added
to an OrderedMap via decoration. |
AbstractSortedMapDecorator |
Provides a base decorator that enables additional functionality to be added
to a Map via decoration. |
DefaultedMap |
Decorates another Map returning a default value if the map
does not contain the requested key. |
FixedSizeMap |
Decorates another Map to fix the size, preventing add/remove. |
LazyMap |
Decorates another Map to create objects in the map on demand. |
ListOrderedMap |
Decorates a Map to ensure that the order of addition is retained
using a List to maintain order. |
MultiValueMap |
A MultiValueMap decorates another map, allowing it to have
more than one value for a key. |
PredicatedMap |
Decorates another Map to validate that additions
match a specified predicate. |
TransformedMap |
Decorates another Map to transform objects that are added. |
UnmodifiableMap |
Decorates another Map to ensure it can't be altered. |
|
Known Indirect Subclasses
AbstractOrderedBidiMapDecorator,
AbstractSortedBidiMapDecorator,
DualTreeBidiMap.ViewMap,
FixedSizeSortedMap,
LazySortedMap,
PredicatedSortedMap,
TransformedSortedMap,
UnmodifiableBidiMap,
UnmodifiableOrderedBidiMap,
UnmodifiableOrderedMap,
UnmodifiableSortedBidiMap,
UnmodifiableSortedMap
|
Class Overview
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()
or values()
. 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.
Summary
Fields |
protected
Map |
map |
The map to decorate |
Protected Constructors |
|
AbstractMapDecorator()
Constructor only used in deserialization, do not use otherwise.
|
Protected Methods |
Map
|
getMap()
Gets the map being decorated.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
java.util.Map
abstract
void
|
clear()
|
abstract
boolean
|
containsKey(Object arg0)
|
abstract
boolean
|
containsValue(Object arg0)
|
abstract
Set<Entry<K, V>>
|
entrySet()
|
abstract
boolean
|
equals(Object arg0)
|
abstract
V
|
get(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
boolean
|
isEmpty()
|
abstract
Set<K>
|
keySet()
|
abstract
V
|
put(K arg0, V arg1)
|
abstract
void
|
putAll(Map<? extends K, ? extends V> arg0)
|
abstract
V
|
remove(Object arg0)
|
abstract
int
|
size()
|
abstract
Collection<V>
|
values()
|
|
Fields
Public Constructors
public
AbstractMapDecorator
(Map map)
Constructor that wraps (not copies).
Parameters
map
| the map to decorate, must not be null |
Protected Constructors
protected
AbstractMapDecorator
()
Constructor only used in deserialization, do not use otherwise.
Public Methods
public
boolean
containsKey
(Object key)
public
boolean
containsValue
(Object value)
public
boolean
equals
(Object object)
public
boolean
isEmpty
()
public
void
putAll
(Map mapToCopy)
Protected Methods
protected
Map
getMap
()
Gets the map being decorated.