public interface

OrderedIterator

implements Iterator<E>
org.apache.commons.collections.OrderedIterator
Known Indirect Subclasses

Class Overview

Defines an iterator that operates over an ordered collection.

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

Summary

Public Methods
abstract boolean hasPrevious()
Checks to see if there is a previous element that can be iterated to.
abstract Object previous()
Gets the previous element from the collection.
[Expand]
Inherited Methods
From interface java.util.Iterator

Public Methods

public abstract 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

public abstract Object previous ()

Gets the previous element from the collection.

Returns
  • the previous element in the iteration
Throws
NoSuchElementException if the iteration is finished