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.
|
removepublic ReverseIterator(java.util.List list)
list - The list with which to construct the iterator.public boolean hasNext()
hasNext in interface java.util.IteratorhasNext in class IteratorAdapterpublic java.lang.Object next()
throws java.util.NoSuchElementException
next in interface java.util.Iteratornext in class IteratorAdapterjava.util.NoSuchElementException - If the element does not exist.