⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.map

Class AbstractOrderedMapDecorator

java.lang.Object
|
+--org.apache.commons.collections.map.AbstractMapDecorator
   |
   +--org.apache.commons.collections.map.AbstractOrderedMapDecorator

All Implemented Interfaces:
Map, OrderedMap

Known Direct Subclasses:
UnmodifiableOrderedMap


public abstract class AbstractOrderedMapDecorator
extends AbstractMapDecorator
implements OrderedMap

Provides a base decorator that enables additional functionality to be added to an OrderedMap via decoration.

Methods are forwarded directly to the decorated map.

This implementation does not perform any special processing with the map views. 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
Author:
Stephen Colebourne

Constructor Summary

AbstractOrderedMapDecorator(OrderedMap map)

Constructor that wraps (not copies).

Method Summary

Object

firstKey()

OrderedMap

getOrderedMap()

Gets the map being decorated.

Object

lastKey()

MapIterator

mapIterator()

Object

nextKey(Object key)

OrderedMapIterator

orderedMapIterator()

Object

previousKey(Object key)

Constructor Details

AbstractOrderedMapDecorator

public AbstractOrderedMapDecorator(OrderedMap map)

Constructor that wraps (not copies).

Parameters:
map - the map to decorate, must not be null
Throws:
- if the collection is null

Method Details

firstKey

public Object firstKey()


getOrderedMap

protected OrderedMap getOrderedMap()

Gets the map being decorated.

Returns:
the decorated map

lastKey

public Object lastKey()


mapIterator

public MapIterator mapIterator()


nextKey

public Object nextKey(Object key)

Parameters:
key

orderedMapIterator

public OrderedMapIterator orderedMapIterator()


previousKey

public Object previousKey(Object key)

Parameters:
key