Top Description Methods
org.apache.commons.collections4

public Interface OrderedIterator<E>

extends Iterator<E>
Known Direct Subinterfaces
org.apache.commons.collections4.OrderedMapIterator, org.apache.commons.collections4.ResettableListIterator
Known Direct Implementers
org.apache.commons.collections4.bidimap.TreeBidiMap.ViewMapEntryIterator, org.apache.commons.collections4.bidimap.TreeBidiMap.InverseViewMapEntryIterator, org.apache.commons.collections4.iterators.EmptyOrderedIterator, org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator, org.apache.commons.collections4.list.TreeList.TreeListIterator, org.apache.commons.collections4.map.AbstractLinkedMap.EntrySetIterator, org.apache.commons.collections4.map.AbstractLinkedMap.KeySetIterator, org.apache.commons.collections4.map.AbstractLinkedMap.ValuesIterator, org.apache.commons.collections4.set.ListOrderedSet.OrderedSetIterator
Type Parameters
<E>
the type of elements returned by this iterator
Imports
java.util.Iterator

Defines an iterator that operates over an ordered container. Subset of java.util.ListIterator.

This iterator allows both forward and reverse iteration through the container.

Since
3.0

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the iterator has a previous element
hasPrevious
()

Checks to see if there is a previous element that can be iterated to.

public E

Returns:

the previous element in the iteration
previous
()

Gets the previous element from the container.

Inherited from java.util.Iterator:
forEachRemaininghasNextnextremove

Method Detail

hasPreviousback to summary
public boolean hasPrevious()

Checks to see if there is a previous element that can be iterated to.

Returns:boolean

true if the iterator has a previous element

previousback to summary
public E previous()

Gets the previous element from the container.

Returns:E

the previous element in the iteration

Exceptions
NoSuchElementException:
if the iteration is finished