Class FilteringInsertBindingsIteration
- java.lang.Object
-
- org.eclipse.rdf4j.federated.evaluation.iterator.FilteringInsertBindingsIteration
-
- All Implemented Interfaces:
AutoCloseable
,Iterator<BindingSet>
,CloseableIteration<BindingSet>
public class FilteringInsertBindingsIteration extends Object implements CloseableIteration<BindingSet>
Filters iteration according to specified filterExpr and inserts original bindings into filtered results.- Author:
- Andreas Schwarte
-
-
Constructor Summary
Constructors Constructor Description FilteringInsertBindingsIteration(FilterValueExpr filterExpr, BindingSet bindings, CloseableIteration<BindingSet> iter, FederationEvalStrategy strategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
accept(BindingSet bindings)
void
close()
Calls#handleClose()
upon first call and makes sure the resource closures are only executed once.boolean
hasNext()
BindingSet
next()
void
remove()
Removes the last element that has been returned from the wrapped Iteration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
stream
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
FilteringInsertBindingsIteration
public FilteringInsertBindingsIteration(FilterValueExpr filterExpr, BindingSet bindings, CloseableIteration<BindingSet> iter, FederationEvalStrategy strategy) throws QueryEvaluationException
- Throws:
QueryEvaluationException
-
-
Method Detail
-
next
public BindingSet next() throws QueryEvaluationException
- Specified by:
next
in interfaceIterator<BindingSet>
- Throws:
QueryEvaluationException
-
accept
protected boolean accept(BindingSet bindings) throws QueryEvaluationException
- Throws:
QueryEvaluationException
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<BindingSet>
-
remove
public void remove()
Removes the last element that has been returned from the wrapped Iteration.- Specified by:
remove
in interfaceIterator<BindingSet>
- Throws:
UnsupportedOperationException
- If the wrapped Iteration does not support the remove operation.IllegalStateException
- if the Iteration has been closed, or ifnext()
has not yet been called, orremove()
has already been called after the last call tonext()
.
-
close
public final void close()
Calls#handleClose()
upon first call and makes sure the resource closures are only executed once.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseableIteration<BindingSet>
-
-