org.apache.commons.collections.bidimap

Class AbstractOrderedBidiMapDecorator

Implemented Interfaces:
BidiMap, IterableMap, Map, OrderedBidiMap, OrderedMap
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.

Version:
$Revision: 1.4 $ $Date: 2004/02/18 00:57:39 $
Author:
Stephen Colebourne
Since:
Commons Collections 3.0

Field Summary

Fields inherited from class org.apache.commons.collections.map.AbstractMapDecorator

map

Constructor Summary

AbstractOrderedBidiMapDecorator(OrderedBidiMap map)
Constructor that wraps (not copies).

Method Summary

Object
firstKey()
protected OrderedBidiMap
getOrderedBidiMap()
Gets the map being decorated.
OrderedBidiMap
inverseOrderedBidiMap()
Object
lastKey()
Object
nextKey(Object key)
OrderedMapIterator
orderedMapIterator()
Object
previousKey(Object key)

Methods inherited from class org.apache.commons.collections.bidimap.AbstractBidiMapDecorator

getBidiMap, getKey, inverseBidiMap, mapIterator, removeValue

Methods inherited from class org.apache.commons.collections.map.AbstractMapDecorator

clear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values

Constructor Details

AbstractOrderedBidiMapDecorator

protected AbstractOrderedBidiMapDecorator(OrderedBidiMap map)
Constructor that wraps (not copies).
Parameters:
map - the map to decorate, must not be null

Method Details

firstKey

public Object firstKey()
Specified by:
firstKey in interface OrderedMap

getOrderedBidiMap

protected OrderedBidiMap getOrderedBidiMap()
Gets the map being decorated.
Returns:
the decorated map

inverseOrderedBidiMap

public OrderedBidiMap inverseOrderedBidiMap()
Specified by:
inverseOrderedBidiMap in interface OrderedBidiMap

lastKey

public Object lastKey()
Specified by:
lastKey in interface OrderedMap

nextKey

public Object nextKey(Object key)
Specified by:
nextKey in interface OrderedMap

orderedMapIterator

public OrderedMapIterator orderedMapIterator()
Specified by:
orderedMapIterator in interface OrderedMap

previousKey

public Object previousKey(Object key)
Specified by:
previousKey in interface OrderedMap

Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.