public interface BidiIterator<T>
extends java.util.Iterator<T>
A bidirectional iterator. It can be used in both directions and even alternating.
It is similar to a ListIterator
besides that it does not
support the index-based operations previousIndex
and
nextIndex
or the mutating operations
set
and
add
.
Modifier and Type | Method and Description |
---|---|
boolean |
hasPrevious()
Returns true if this bidi iterator has more elements when
traversing in the reverse direction.
|
T |
previous()
Returns the previous element.
|
boolean hasPrevious()
T previous()
java.util.NoSuchElementException
- if the iteration has no previous
element.