Class FilterIterator<E>
java.lang.Object
org.eclipse.rdf4j.common.iterator.FilterIterator<E>
- All Implemented Interfaces:
Iterator<E>
A CloseableIterator that wraps another iterator, applying a filter on the objects that are returned. Subclasses must
implement the accept method to indicate which objects should be returned.
-
Constructor Details
-
FilterIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
accept
Tests whether or not the specified object should be returned by this iterator. All objects from the wrapped iterator pass through this method in the same order as they are coming from the wrapped iterator.- Parameters:
object
- The object to be tested.- Returns:
- true if the object should be returned, false otherwise.
-