org.hypergraphdb
Interface TwoWayIterator<T>

All Superinterfaces:
java.util.Iterator<T>
All Known Subinterfaces:
HGRandomAccessResult<ValueType>, HGSearchResult<T>, RSCombiner<T>
All Known Implementing Classes:
FilteredResultSet, HandleArrayResultSet, IndexResultSet, InMemoryIntersectionResult, KeyScanResultSet, LinkTargetsResultSet, MappedResult, PipedResult, ProjectionAtomResultSet, SingleKeyResultSet, SingleValueResultSet, SortedIntersectionResult, TraversalResult, UnionResult, ZigZagIntersectionResult

public interface TwoWayIterator<T>
extends java.util.Iterator<T>

This interface defines a bi-directional iterator over a collection of objects.

Author:
Borislav Iordanov

Method Summary
 boolean hasPrev()
           Return true if there is a previous element in the current iteration state and false otherwise.
 T prev()
           Returns the previous element in this iteration.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

hasPrev

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.


prev

T prev()

Returns the previous element in this iteration.

Throws:
NoSuchElementException - if there is no previous element (e.g. at the beginning of the iteration).