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.
| Modifier and Type | Class and Description |
|---|---|
| protected static class | AbstractSortedMapDecorator.SortedMapIterator<
the key type K, the value type V>OrderedMapIterator implementation. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | AbstractSortedMapDecorator(final SortedMap<K, V>
the map to decorate, must not be null map)Constructor that wraps (not copies). |
| Modifier and Type | Method and Description |
|---|---|
| public Comparator | comparator()
Implements java. null if this map uses the natural ordering of its keys.
|
| protected SortedMap | Returns: the decorated mapOverrides org. |
| public K | firstKey()
Implements java. |
| public SortedMap | headMap(final K
high endpoint (exclusive) of the keys in the returned map toKey)Implements java. toKey.
|
| public K | lastKey()
Implements java. |
| public OrderedMapIterator | mapIterator()
Overrides org. Implements org. OrderedMapIterator over the map.
|
| public K | nextKey(final K
the key to search for next from key)Implements org. |
| public K | previousKey(final K
the key to search for previous from key)Implements org. |
| public SortedMap | subMap(final K
low endpoint (inclusive) of the keys in the returned map fromKey, final K high endpoint (exclusive) of the keys in the returned map toKey)Implements java. fromKey, inclusive, to toKey, exclusive.
|
| public SortedMap | tailMap(final K
low endpoint (inclusive) of the keys in the returned map fromKey)Implements java. fromKey.
|
| AbstractSortedMapDecorator | back to summary |
|---|---|
| protected AbstractSortedMapDecorator() Constructor only used in deserialization, do not use otherwise.
| |
| AbstractSortedMapDecorator | back to summary |
|---|---|
| public AbstractSortedMapDecorator(final SortedMap<K, V> map) Constructor that wraps (not copies).
| |
| comparator | back to summary |
|---|---|
| public Comparator Implements java. Doc from java. Returns the comparator used to order the keys in this map, or
| |
| decorated | back to summary |
|---|---|
| protected SortedMap Overrides org. Gets the map being decorated. | |
| firstKey | back to summary |
|---|---|
| public K firstKey() Implements java. Doc from java. Returns the first (lowest) key currently in this map.
| |
| headMap | back to summary |
|---|---|
| public SortedMap Implements java. Doc from java. Returns a view of the portion of this map whose keys are
strictly less than The returned map will throw an | |
| lastKey | back to summary |
|---|---|
| public K lastKey() Implements java. Doc from java. Returns the last (highest) key currently in this map.
| |
| mapIterator | back to summary |
|---|---|
| public OrderedMapIterator Overrides org. Implements org. Doc from org. Obtains an A ordered map iterator is an efficient way of iterating over maps in both directions.
| |
| nextKey | back to summary |
|---|---|
| public K nextKey(final K key) Implements org. Doc from org. Gets the next key after the one specified.
| |
| previousKey | back to summary |
|---|---|
| public K previousKey(final K key) Implements org. Doc from org. Gets the previous key before the one specified.
| |
| subMap | back to summary |
|---|---|
| public SortedMap Implements java. Doc from java. Returns a view of the portion of this map whose keys range from
The returned map will throw an | |
| tailMap | back to summary |
|---|---|
| public SortedMap Implements java. Doc from java. Returns a view of the portion of this map whose keys are
greater than or equal to The returned map will throw an | |
| Access | Constructor and Description |
|---|---|
| protected | SortedMapIterator(final Set<Map.
the entrySet to iterate entrySetCreate a new AbstractSortedMapDecorator.SortedMapIterator. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | hasPrevious()
Implements org. |
| public K | previous()
Implements org. Map.
|
| public synchronized void | reset()
Overrides org. Implements org. |
| SortedMapIterator | back to summary |
|---|---|
| protected SortedMapIterator(final Set<Map. Create a new AbstractSortedMapDecorator.SortedMapIterator. | |
| hasPrevious | back to summary |
|---|---|
| public boolean hasPrevious() Implements org. Doc from org. Checks to see if there is a previous entry that can be iterated to.
| |
| previous | back to summary |
|---|---|
| public K previous() Implements org. Doc from org. Gets the previous key from the
| |
| reset | back to summary |
|---|---|
| public synchronized void reset() Overrides org. Implements org. Doc from org. Resets the iterator back to the position at which the iterator was created.
| |