Class LookaheadIterator<T>
java.lang.Object
org.archive.util.iterator.LookaheadIterator<T>
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
LineReadingIterator,TransformingIteratorWrapper
Superclass for Iterators which must probe ahead to know if
a 'next' exists, and thus have a cached next between a call
to hasNext() and next().
- Author:
- gojomo
-
Field Details
-
next
-
-
Constructor Details
-
LookaheadIterator
public LookaheadIterator()
-
-
Method Details
-
hasNext
-
lookahead
protected abstract boolean lookahead()Caches the next item if available.- Returns:
- true if there was a next item to cache, false otherwise
-
next
-
remove
-