Class IntersectIteration<E>

java.lang.Object
org.eclipse.rdf4j.common.iteration.FilterIteration<E>
org.eclipse.rdf4j.common.iteration.IntersectIteration<E>
All Implemented Interfaces:
AutoCloseable, Iterator<E>, CloseableIteration<E>

public class IntersectIteration<E> extends FilterIteration<E>
An Iteration that returns the intersection of the results of two Iterations. Optionally, the Iteration can be configured to filter duplicates from the returned elements.

Note that duplicates can also be filtered by wrapping this Iteration in a DistinctIteration, but that has a bit more overhead as it adds a second hash table lookup.