it.unimi.dsi.fastutil
Interface BidirectionalIterator

All Superinterfaces:
Iterator
All Known Subinterfaces:
BooleanBidirectionalIterator, BooleanListIterator, ByteBidirectionalIterator, ByteListIterator, CharBidirectionalIterator, CharListIterator, DoubleBidirectionalIterator, DoubleListIterator, FloatBidirectionalIterator, FloatListIterator, IntBidirectionalIterator, IntListIterator, LongBidirectionalIterator, LongListIterator, ObjectBidirectionalIterator, ObjectListIterator, ShortBidirectionalIterator, ShortListIterator
All Known Implementing Classes:
AbstractBooleanBidirectionalIterator, AbstractBooleanListIterator, AbstractByteBidirectionalIterator, AbstractByteListIterator, AbstractCharBidirectionalIterator, AbstractCharListIterator, AbstractDoubleBidirectionalIterator, AbstractDoubleListIterator, AbstractFloatBidirectionalIterator, AbstractFloatListIterator, AbstractIntBidirectionalIterator, AbstractIntListIterator, AbstractLongBidirectionalIterator, AbstractLongListIterator, AbstractObjectBidirectionalIterator, AbstractObjectListIterator, AbstractShortBidirectionalIterator, AbstractShortListIterator, Iterators.EmptyIterator

public interface BidirectionalIterator
extends Iterator

A bidirectional Iterator.

This kind of iterator is esssentially 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.

See Also:
Iterator, ListIterator

Method Summary
 boolean hasPrevious()
          Returns whether there is a previous element.
 Object previous()
          Returns the previous element from the collection.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

previous

public Object previous()
Returns the previous element from the collection.

Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

hasPrevious

public boolean hasPrevious()
Returns whether there is a previous element.

Returns:
whether there is a previous element.
See Also:
ListIterator.hasPrevious()