public abstract class

AbstractSortedMapDecorator

extends AbstractMapDecorator
implements SortedMap<K, V>
java.lang.Object
   ↳ org.apache.commons.collections.map.AbstractMapDecorator
     ↳ org.apache.commons.collections.map.AbstractSortedMapDecorator
Known Direct Subclasses

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class org.apache.commons.collections.map.AbstractMapDecorator
Public Constructors
AbstractSortedMapDecorator(SortedMap map)
Constructor that wraps (not copies).
Protected Constructors
AbstractSortedMapDecorator()
Constructor only used in deserialization, do not use otherwise.
Public Methods
Comparator comparator()
Object firstKey()
SortedMap headMap(Object toKey)
Object lastKey()
SortedMap subMap(Object fromKey, Object toKey)
SortedMap tailMap(Object fromKey)
Protected Methods
SortedMap getSortedMap()
Gets the map being decorated.
[Expand]
Inherited Methods
From class org.apache.commons.collections.map.AbstractMapDecorator
From class java.lang.Object
From interface java.util.Map
From interface java.util.SortedMap

Public Constructors

public AbstractSortedMapDecorator (SortedMap map)

Constructor that wraps (not copies).

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

Protected Constructors

protected AbstractSortedMapDecorator ()

Constructor only used in deserialization, do not use otherwise.

Public Methods

public Comparator comparator ()

public Object firstKey ()

public SortedMap headMap (Object toKey)

public Object lastKey ()

public SortedMap subMap (Object fromKey, Object toKey)

public SortedMap tailMap (Object fromKey)

Protected Methods

protected SortedMap getSortedMap ()

Gets the map being decorated.

Returns
  • the decorated map