public interface OrderedMap extends IterableMap
Modifier and Type | Method and 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 © 2010 - 2020 Adobe. All Rights Reserved