Package com.complexible.common.collect
Interface BidirectionalIterator<T>
-
- Type Parameters:
T
- the type of element in the iterator
- All Superinterfaces:
java.util.Iterator<T>
public interface BidirectionalIterator<T> extends java.util.Iterator<T>
An Iterator which can iterate back to previous elements.
- Since:
- 2.0
- Version:
- 2.0
- Author:
- Pavel Klinov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasPrevious()
Return whether or not there is a previous elementT
previous()
Return the previous element
-
-
-
Method Detail
-
hasPrevious
boolean hasPrevious()
Return whether or not there is a previous element- Returns:
- true if there is a previous, false otherwise
-
previous
T previous()
Return the previous element- Returns:
- the previous element
-
-