public class ReverseListIterator<E> extends Object implements ListIterator<E>
ReverseListIterator takes a List and gives
you an Iterator that traverses the list in reverse
order. Similar to using ReverseIterator(l.iterator())
but more efficient as it does not need to create a snapshot.| Constructor and Description |
|---|
ReverseListIterator(List<E> l)
Creates a
ReverseListIterator. |
public ReverseListIterator(List<E> l)
ReverseListIterator.public void add(E o)
add in interface ListIterator<E>public boolean hasNext()
public boolean hasPrevious()
hasPrevious in interface ListIterator<E>public E next()
public int nextIndex()
nextIndex in interface ListIterator<E>public E previous()
previous in interface ListIterator<E>public int previousIndex()
previousIndex in interface ListIterator<E>public void remove()
public void set(E o)
set in interface ListIterator<E>Copyright (c) 2006 C. Scott Ananian