Class CloseableIteratorRecursive<E>
java.lang.Object
fr.lirmm.graphik.util.stream.AbstractCloseableIterator<E>
fr.lirmm.graphik.util.stream.CloseableIteratorRecursive<E>
- Type Parameters:
E- the iterated element type
- All Implemented Interfaces:
CloseableIterator<E>, Closeable, AutoCloseable
This Iterator iterate recursively on Iterator or CloseableIterable results
from a primary iterator.
- Author:
- Olivier Rodriguez
-
Constructor Summary
ConstructorsConstructorDescriptionCloseableIteratorRecursive(CloseableIterator<E> primaryIterator) Creates a recursive iterator from a primary iterator. -
Method Summary
Methods inherited from class AbstractCloseableIterator
finalize
-
Constructor Details
-
CloseableIteratorRecursive
Creates a recursive iterator from a primary iterator.- Parameters:
primaryIterator- the iterator producing elements or nested iterators
-
-
Method Details
-
hasNext
Description copied from interface:CloseableIteratorReturns whether another element is available.- Returns:
- true if another element can be read
- Throws:
IteratorException- if the iteration fails
-
next
Description copied from interface:CloseableIteratorReturns the next element.- Returns:
- the next element
- Throws:
IteratorException- if the iteration fails
-
close
public void close()
-