Class CloseableIteratorAggregatorWithoutException<E>
java.lang.Object
fr.lirmm.graphik.util.stream.AbstractCloseableIterator<E>
fr.lirmm.graphik.util.stream.CloseableIteratorAggregatorWithoutException<E>
- Type Parameters:
E- type of elements of the iterator
- All Implemented Interfaces:
CloseableIterator<E>, CloseableIteratorWithoutException<E>, Closeable, AutoCloseable, Iterator<E>
public class CloseableIteratorAggregatorWithoutException<E>
extends AbstractCloseableIterator<E>
implements CloseableIteratorWithoutException<E>
Aggregates closeable iterators into a single closeable iterator without checked exceptions.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Constructor Summary
ConstructorsConstructorDescriptionCloseableIteratorAggregatorWithoutException(CloseableIteratorWithoutException<CloseableIteratorWithoutException<E>> metaIt) Creates an aggregator over a closeable iterator of closeable iterators.Creates an aggregator over a standard iterator of closeable iterators. -
Method Summary
Methods inherited from class AbstractCloseableIterator
finalizeMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Constructor Details
-
CloseableIteratorAggregatorWithoutException
public CloseableIteratorAggregatorWithoutException(CloseableIteratorWithoutException<CloseableIteratorWithoutException<E>> metaIt) Creates an aggregator over a closeable iterator of closeable iterators.- Parameters:
metaIt- the outer iterator
-
CloseableIteratorAggregatorWithoutException
public CloseableIteratorAggregatorWithoutException(Iterator<CloseableIteratorWithoutException<E>> metaIt) Creates an aggregator over a standard iterator of closeable iterators.- Parameters:
metaIt- the outer iterator
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:CloseableIteratorReturns whether another element is available.- Specified by:
hasNextin interfaceCloseableIterator<E>- Specified by:
hasNextin interfaceCloseableIteratorWithoutException<E>- Specified by:
hasNextin interfaceIterator<E>- Returns:
- true if another element can be read
-
next
Description copied from interface:CloseableIteratorReturns the next element.- Specified by:
nextin interfaceCloseableIterator<E>- Specified by:
nextin interfaceCloseableIteratorWithoutException<E>- Specified by:
nextin interfaceIterator<E>- Returns:
- the next element
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<E>
-