|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Public @InterfaceStability.Stable public interface ResetableIterator<T extends Writable>
This defines an interface to a stateful Iterator that can replay elements
added to it directly.
Note that this does not extend Iterator
.
Method Summary | |
---|---|
void |
add(T item)
Add an element to the collection of elements to iterate over. |
void |
clear()
Close datasources, but do not release internal resources. |
void |
close()
Close datasources and release resources. |
boolean |
hasNext()
True if a call to next may return a value. |
boolean |
next(T val)
Assign next value to actual. |
boolean |
replay(T val)
Assign last value returned to actual. |
void |
reset()
Set iterator to return to the start of its range. |
Method Detail |
---|
boolean hasNext()
boolean next(T val) throws IOException
reset()
(FIFO).
Note that a call to this may fail for nested joins (i.e. more elements
available, but none satisfying the constraints of the join)
IOException
boolean replay(T val) throws IOException
IOException
void reset()
add(T)
to avoid a ConcurrentModificationException.
void add(T item) throws IOException
IOException
void close() throws IOException
IOException
void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |