public interface TwoWayIterator<T> extends Iterator<T>
This interface defines a bi-directional iterator over a collection of objects.
boolean hasPrev()
Return true
if there is a previous element in the current
iteration state and false
otherwise. After the iterator
has been initialized, the value of hasPrev
will always be
false
.
T prev()
Returns the previous element in this iteration.
NoSuchElementException
- if there is no previous element (e.g. at
the beginning of the iteration).Copyright © 2015. All rights reserved.