Class AbstractSortedMapDecorator.SortedMapIterator<K,V>
- java.lang.Object
-
- org.apache.openjpa.lib.util.collections.EntrySetToMapIteratorAdapter<K,V>
-
- org.apache.openjpa.lib.util.collections.AbstractSortedMapDecorator.SortedMapIterator<K,V>
-
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
java.util.Iterator<K>,MapIterator<K,V>,OrderedIterator<K>,OrderedMapIterator<K,V>,ResettableIterator<K>
- Enclosing class:
- AbstractSortedMapDecorator<K,V>
protected static class AbstractSortedMapDecorator.SortedMapIterator<K,V> extends EntrySetToMapIteratorAdapter<K,V> implements OrderedMapIterator<K,V>
OrderedMapIterator implementation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSortedMapIterator(java.util.Set<java.util.Map.Entry<K,V>> entrySet)Create a new AbstractSortedMapDecorator.SortedMapIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasPrevious()Checks to see if there is a previous entry that can be iterated to.Kprevious()Gets the previous key from theMap.voidreset()Resets the iterator back to the position at which the iterator was created.-
Methods inherited from class org.apache.openjpa.lib.util.collections.EntrySetToMapIteratorAdapter
current, getKey, getValue, hasNext, next, remove, setValue
-
-
-
-
Method Detail
-
reset
public void reset()
Resets the iterator back to the position at which the iterator was created.- Specified by:
resetin interfaceResettableIterator<K>- Overrides:
resetin classEntrySetToMapIteratorAdapter<K,V>
-
hasPrevious
public boolean hasPrevious()
Checks to see if there is a previous entry that can be iterated to.- Specified by:
hasPreviousin interfaceOrderedIterator<K>- Specified by:
hasPreviousin interfaceOrderedMapIterator<K,V>- Returns:
trueif the iterator has a previous element
-
previous
public K previous()
Gets the previous key from theMap.- Specified by:
previousin interfaceOrderedIterator<K>- Specified by:
previousin interfaceOrderedMapIterator<K,V>- Returns:
- the previous key in the iteration
-
-