public class ReverseIterator<E> extends SnapshotIterator<E>
ReverseIterator iterates through an Iterator
in reverse order. It extends SnapshotIterator, so is
insensitive to changes in the underlying collection once construction
is complete.| Constructor and Description |
|---|
ReverseIterator(java.util.Iterator<E> it)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if the iteration has more elements. |
E |
next()
Returns the next element in the iteration.
|
proxy, removepublic ReverseIterator(java.util.Iterator<E> it)
public boolean hasNext()
UnmodifiableIteratortrue if the iteration has more elements.hasNext in interface java.util.Iterator<E>hasNext in class SnapshotIterator<E>true if the iterator has more elements.public E next()
UnmodifiableIteratornext in interface java.util.Iterator<E>next in class SnapshotIterator<E>Copyright (c) 2006 C. Scott Ananian