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.
Version:
- Stephen Colebourne
- Commons Collections 3.0
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.
- Commons Collections 3.1
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.
- the decorated map
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-2005 Apache Software Foundation. All Rights Reserved.