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

Class AbstractOrderedBidiMapDecorator

java.lang.Object
|
+--org.apache.commons.collections.map.AbstractMapDecorator
   |
   +--org.apache.commons.collections.bidimap.AbstractBidiMapDecorator
      |
      +--org.apache.commons.collections.bidimap.AbstractOrderedBidiMapDecorator

All Implemented Interfaces:
Map, BidiMap, OrderedBidiMap

Known Direct Subclasses:
AbstractSortedBidiMapDecorator, UnmodifiableOrderedBidiMap


public abstract class AbstractOrderedBidiMapDecorator
extends AbstractBidiMapDecorator
implements OrderedBidiMap

Provides a base decorator that enables additional functionality to be added to an OrderedBidiMap 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 inverse 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

AbstractOrderedBidiMapDecorator(OrderedBidiMap map)

Constructor that wraps (not copies).

Method Summary

Object

firstKey()

OrderedBidiMap

getOrderedBidiMap()

Gets the map being decorated.

OrderedBidiMap

inverseOrderedBidiMap()

Object

lastKey()

Object

nextKey(Object key)

OrderedMapIterator

orderedMapIterator()

Object

previousKey(Object key)

Constructor Details

AbstractOrderedBidiMapDecorator

protected AbstractOrderedBidiMapDecorator(OrderedBidiMap 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()


getOrderedBidiMap

protected OrderedBidiMap getOrderedBidiMap()

Gets the map being decorated.

Returns:
the decorated map

inverseOrderedBidiMap

public OrderedBidiMap inverseOrderedBidiMap()


lastKey

public Object lastKey()


nextKey

public Object nextKey(Object key)

Parameters:
key

orderedMapIterator

public OrderedMapIterator orderedMapIterator()


previousKey

public Object previousKey(Object key)

Parameters:
key