Interface OrderedMap<K,V> 
- Type Parameters:
- K- the type of the keys in the map
- V- the type of the values in the map
- All Superinterfaces:
- Get<K,,- V> - IterableGet<K,,- V> - IterableMap<K,,- V> - Map<K,,- V> - Put<K,- V> 
- All Known Subinterfaces:
- IterableSortedMap<K,,- V> - OrderedBidiMap<K,,- V> - SortedBidiMap<K,,- V> - Trie<K,- V> 
- All Known Implementing Classes:
- AbstractBitwiseTrie,- AbstractLinkedMap,- AbstractOrderedBidiMapDecorator,- AbstractOrderedMapDecorator,- AbstractPatriciaTrie,- AbstractSortedBidiMapDecorator,- AbstractSortedMapDecorator,- DualTreeBidiMap,- DualTreeBidiMap.ViewMap,- FixedSizeSortedMap,- LinkedMap,- ListOrderedMap,- LRUMap,- PatriciaTrie,- SingletonMap,- TreeBidiMap,- UnmodifiableOrderedBidiMap,- UnmodifiableOrderedMap,- UnmodifiableSortedBidiMap,- UnmodifiableSortedMap,- UnmodifiableTrie
Defines a map that maintains order and allows both forward and backward
 iteration through that order.
- Since:
- 3.0
- 
Nested Class Summary
- 
Method SummaryModifier and TypeMethodDescriptionfirstKey()Gets the first key currently in this map.lastKey()Gets the last key currently in this map.Obtains anOrderedMapIteratorover the map.Gets the next key after the one specified.previousKey(K key) Gets the previous key before the one specified.Methods inherited from interface org.apache.commons.collections4.GetcontainsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, valuesMethods inherited from interface java.util.Mapclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
- 
Method Details- 
firstKeyGets the first key currently in this map.- Returns:
- the first key currently in this map
- Throws:
- NoSuchElementException- if this map is empty
 
- 
lastKeyGets the last key currently in this map.- Returns:
- the last key currently in this map
- Throws:
- NoSuchElementException- if this map is empty
 
- 
mapIteratorObtains anOrderedMapIteratorover the map.An ordered map iterator is an efficient way of iterating over maps in both directions. - Specified by:
- mapIteratorin interface- IterableGet<K,- V> 
- Returns:
- a map iterator
 
- 
nextKey
- 
previousKeyGets the previous key before the one specified.- Parameters:
- key- the key to search for previous from
- Returns:
- the previous key, null if no match or at start
 
 
-