public class ReverseIterator extends IteratorAdapter
Constructor and Description |
---|
ReverseIterator(java.util.List list)
Construct a reverse iterator on the given list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Test if there are more elements.
|
java.lang.Object |
next()
Return the next element.
|
remove
public ReverseIterator(java.util.List list)
list
- The list with which to construct the iterator.public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in class IteratorAdapter
public java.lang.Object next() throws java.util.NoSuchElementException
next
in interface java.util.Iterator
next
in class IteratorAdapter
java.util.NoSuchElementException
- If the element does not exist.