public interface BidirectionalIterator<K>
extends java.util.Iterator<K>
Iterator
.
This kind of iterator is essentially a ListIterator
that
does not support ListIterator.previousIndex()
and ListIterator.nextIndex()
. It is useful for those maps that can easily
provide bidirectional iteration, but provide no index.
Note that iterators returned by fastutil
classes are more
specific, and support skipping. This class serves the purpose of organising
in a cleaner way the relationships between various iterators.
Iterator
,
ListIterator
Modifier and Type | Method and Description |
---|---|
boolean |
hasPrevious()
Returns whether there is a previous element.
|
K |
previous()
Returns the previous element from the collection.
|
K previous()
ListIterator.previous()
boolean hasPrevious()
ListIterator.hasPrevious()