Class FilterIteratorWithoutException<U,T>
java.lang.Object
fr.inria.rules.integraal.util.stream.filter.FilterIterator<U,T>
fr.inria.rules.integraal.util.stream.filter.FilterIteratorWithoutException<U,T>
- Type Parameters:
U- type of the initial elementsT- type of the result elements
- All Implemented Interfaces:
CloseableIterator<T>, CloseableIteratorWithoutException<T>, Closeable, AutoCloseable, Iterator<T>
public class FilterIteratorWithoutException<U,T>
extends FilterIterator<U,T>
implements CloseableIteratorWithoutException<T>
Applies a filter while exposing an iterator that does not throw checked iterator exceptions.
- Author:
- Clement Sipieter (INRIA) <clement@6pi.fr>
-
Constructor Summary
ConstructorsConstructorDescriptionFilterIteratorWithoutException(CloseableIteratorWithoutException<U> it, Filter<U> filter) Creates a filtering iterator from a closeable iterator.FilterIteratorWithoutException(Iterator<U> it, Filter<U> filter) Creates a filtering iterator from a plain iterator. -
Method Summary
Methods inherited from class FilterIterator
closeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIterator
closeMethods inherited from interface Iterator
forEachRemaining, remove
-
Constructor Details
-
FilterIteratorWithoutException
Creates a filtering iterator from a closeable iterator.- Parameters:
it- iteratorfilter- filter
-
FilterIteratorWithoutException
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:CloseableIteratorIndicates whether another element can be read from the iterator.- Specified by:
hasNextin interfaceCloseableIterator<U>- Specified by:
hasNextin interfaceCloseableIteratorWithoutException<U>- Specified by:
hasNextin interfaceIterator<U>- Overrides:
hasNextin classFilterIterator<U,T> - Returns:
- true iff there is a next element
-
next
Description copied from interface:CloseableIteratorReturns the next element from the iterator.- Specified by:
nextin interfaceCloseableIterator<U>- Specified by:
nextin interfaceCloseableIteratorWithoutException<U>- Specified by:
nextin interfaceIterator<U>- Overrides:
nextin classFilterIterator<U,T> - Returns:
- the next element
-