Package org.apache.commons.collections4
Interface OrderedIterator<E>
-
- Type Parameters:
E
- the type of elements returned by this iterator
- All Superinterfaces:
java.util.Iterator<E>
- All Known Subinterfaces:
OrderedMapIterator<K,V>
,ResettableListIterator<E>
- All Known Implementing Classes:
AbstractLinkedList.LinkedListIterator
,AbstractLinkedList.LinkedSubListIterator
,AbstractLinkedMap.EntrySetIterator
,AbstractLinkedMap.KeySetIterator
,AbstractLinkedMap.LinkMapIterator
,AbstractLinkedMap.ValuesIterator
,AbstractOrderedMapIteratorDecorator
,AbstractPatriciaTrie.TrieMapIterator
,AbstractSortedMapDecorator.SortedMapIterator
,ArrayListIterator
,CursorableLinkedList.Cursor
,CursorableLinkedList.SubCursor
,DualTreeBidiMap.BidiOrderedMapIterator
,EmptyListIterator
,EmptyOrderedIterator
,EmptyOrderedMapIterator
,ListIteratorWrapper
,ListOrderedMap.ListOrderedMapIterator
,ListOrderedSet.OrderedSetIterator
,LoopingListIterator
,ObjectArrayListIterator
,ReverseListIterator
,SingletonListIterator
,SingletonMap.SingletonMapIterator
,TreeBidiMap.InverseViewMapEntryIterator
,TreeBidiMap.InverseViewMapIterator
,TreeBidiMap.ViewMapEntryIterator
,TreeBidiMap.ViewMapIterator
,TreeList.TreeListIterator
,UnmodifiableOrderedMapIterator
public interface OrderedIterator<E> extends java.util.Iterator<E>
Defines an iterator that operates over an ordered container. Subset ofListIterator
.This iterator allows both forward and reverse iteration through the container.
- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasPrevious()
Checks to see if there is a previous element that can be iterated to.E
previous()
Gets the previous element from the container.
-
-
-
Method Detail
-
hasPrevious
boolean hasPrevious()
Checks to see if there is a previous element that can be iterated to.- Returns:
true
if the iterator has a previous element
-
previous
E previous()
Gets the previous element from the container.- Returns:
- the previous element in the iteration
- Throws:
java.util.NoSuchElementException
- if the iteration is finished
-
-