org.apache.commons.collections
Interface OrderedIterator<E>

All Superinterfaces:
Iterator<E>
All Known Subinterfaces:
OrderedMapIterator<K,V>
All Known Implementing Classes:
AbstractLinkedList.LinkedListIterator, AbstractLinkedList.LinkedSubListIterator, AbstractLinkedMap.EntrySetIterator, AbstractLinkedMap.KeySetIterator, AbstractLinkedMap.LinkMapIterator, AbstractLinkedMap.ValuesIterator, AbstractOrderedMapIteratorDecorator, CursorableLinkedList.Cursor, DualTreeBidiMap.BidiOrderedMapIterator, EmptyOrderedIterator, EmptyOrderedMapIterator, UnmodifiableOrderedMapIterator

public interface OrderedIterator<E>
extends Iterator<E>

Defines an iterator that operates over a ordered collections.

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

Since:
Commons Collections 3.0
Version:
$Revision: 1.1.1.1 $ $Date: 2005/05/23 04:33:16 $
Author:
Matt Hall, John Watkinson, Stephen Colebourne

Method Summary
 boolean hasPrevious()
          Checks to see if there is a previous entry that can be iterated to.
 E previous()
          Gets the previous element from the collection.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

hasPrevious

boolean hasPrevious()
Checks to see if there is a previous entry that can be iterated to.

Returns:
true if the iterator has a previous element

previous

E previous()
Gets the previous element from the collection.

Returns:
the previous key in the iteration
Throws:
NoSuchElementException - if the iteration is finished


Copyright © 2005-2005 Apache Software Foundation, Matt Hall, John Watkinson. All Rights Reserved.