org.apache.commons.collections.map
Class AbstractSortedMapDecorator
- Map, SortedMap
public abstract class AbstractSortedMapDecorator
implements SortedMap
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 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.
$Revision: 1.5 $ $Date: 2004/04/02 21:16:50 $
clear , containsKey , containsValue , entrySet , equals , get , getMap , hashCode , isEmpty , keySet , put , putAll , remove , size , toString , values |
AbstractSortedMapDecorator
protected AbstractSortedMapDecorator()
Constructor only used in deserialization, do not use otherwise.
AbstractSortedMapDecorator
public AbstractSortedMapDecorator(SortedMap map)
Constructor that wraps (not copies).
map
- the map to decorate, must not be null
comparator
public Comparator comparator()
firstKey
public Object firstKey()
getSortedMap
protected SortedMap getSortedMap()
Gets the map being decorated.
headMap
public SortedMap headMap(Object toKey)
lastKey
public Object lastKey()
subMap
public SortedMap subMap(Object fromKey,
Object toKey)
tailMap
public SortedMap tailMap(Object fromKey)
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.