Package org.codelibs.jhighlight.fastutil
Interface BidirectionalIterator<K>
-
- All Superinterfaces:
Iterator<K>
- All Known Subinterfaces:
CharBidirectionalIterator
,CharListIterator
,ObjectBidirectionalIterator<K>
,ObjectListIterator<K>
- All Known Implementing Classes:
AbstractCharBidirectionalIterator
,AbstractCharListIterator
,AbstractObjectBidirectionalIterator
,AbstractObjectListIterator
,CharIterators.EmptyIterator
,CharIterators.UnmodifiableBidirectionalIterator
,CharIterators.UnmodifiableListIterator
,ObjectIterators.EmptyIterator
,ObjectIterators.UnmodifiableBidirectionalIterator
,ObjectIterators.UnmodifiableListIterator
public interface BidirectionalIterator<K> extends Iterator<K>
A bidirectionalIterator
.This kind of iterator is essentially a
ListIterator
that does not supportListIterator.previousIndex()
andListIterator.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.- See Also:
Iterator
,ListIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasPrevious()
Returns whether there is a previous element.K
previous()
Returns the previous element from the collection.-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
previous
K previous()
Returns the previous element from the collection.- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()
-
hasPrevious
boolean hasPrevious()
Returns whether there is a previous element.- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
-
-