IterableMap
, java.util.Map
OrderedBidiMap
, SortedBidiMap
AbstractLinkedMap
, AbstractOrderedBidiMapDecorator
, AbstractOrderedMapDecorator
, AbstractSortedBidiMapDecorator
, DualTreeBidiMap
, LinkedMap
, ListOrderedMap
, LRUMap
, SingletonMap
, TreeBidiMap
, UnmodifiableOrderedBidiMap
, UnmodifiableOrderedMap
, UnmodifiableSortedBidiMap
public interface OrderedMap extends IterableMap
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
firstKey() |
Gets the first key currently in this map.
|
java.lang.Object |
lastKey() |
Gets the last key currently in this map.
|
java.lang.Object |
nextKey(java.lang.Object key) |
Gets the next key after the one specified.
|
OrderedMapIterator |
orderedMapIterator() |
Obtains an
OrderedMapIterator over the map. |
java.lang.Object |
previousKey(java.lang.Object key) |
Gets the previous key before the one specified.
|
mapIterator
OrderedMapIterator orderedMapIterator()
OrderedMapIterator
over the map.
A ordered map iterator is an efficient way of iterating over maps in both directions.
BidiMap map = new TreeBidiMap(); MapIterator it = map.mapIterator(); while (it.hasNext()) { Object key = it.next(); Object value = it.getValue(); it.setValue("newValue"); Object previousKey = it.previous(); }
java.lang.Object firstKey()
java.util.NoSuchElementException
- if this map is emptyjava.lang.Object lastKey()
java.util.NoSuchElementException
- if this map is emptyjava.lang.Object nextKey(java.lang.Object key)
key
- the key to search for next fromjava.lang.Object previousKey(java.lang.Object key)
key
- the key to search for previous fromCopyright © 2001-2017 Apache Software Foundation. All Rights Reserved.