Package org.eclipse.rdf4j.sail.helpers
Class TupleExprWrapperIteration<T extends BindingSet,X extends java.lang.Exception>
- java.lang.Object
-
- org.eclipse.rdf4j.sail.helpers.TupleExprWrapperIteration<T,X>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,CloseableIteration<T,X>
,Iteration<T,X>
class TupleExprWrapperIteration<T extends BindingSet,X extends java.lang.Exception> extends java.lang.Object implements CloseableIteration<T,X>
This iteration is used to debug issues with the TupleExpr that was used to generate the wrapped iteration. AbstractSailConnection will use this class when evaluating a query if assertions are enabled.
-
-
Field Summary
Fields Modifier and Type Field Description private CloseableIteration<T,X>
delegate
private TupleExpr
tupleExpr
private TupleExpr
tupleExprClone
-
Constructor Summary
Constructors Constructor Description TupleExprWrapperIteration(CloseableIteration<T,X> delegate, TupleExpr tupleExpr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this iteration, freeing any resources that it is holding.TupleExpr
getTupleExpr()
TupleExpr
getTupleExprClone()
boolean
hasNext()
Returns true if the iteration has more elements.T
next()
Returns the next element in the iteration.void
remove()
Removes from the underlying collection the last element returned by the iteration (optional operation).java.util.stream.Stream<T>
stream()
Convert the results to a Java 8 Stream.
-
-
-
Field Detail
-
delegate
private final CloseableIteration<T extends BindingSet,X extends java.lang.Exception> delegate
-
tupleExpr
private final TupleExpr tupleExpr
-
tupleExprClone
private final TupleExpr tupleExprClone
-
-
Constructor Detail
-
TupleExprWrapperIteration
public TupleExprWrapperIteration(CloseableIteration<T,X> delegate, TupleExpr tupleExpr)
-
-
Method Detail
-
stream
public java.util.stream.Stream<T> stream()
Description copied from interface:CloseableIteration
Convert the results to a Java 8 Stream.- Specified by:
stream
in interfaceCloseableIteration<T extends BindingSet,X extends java.lang.Exception>
- Specified by:
stream
in interfaceIteration<T extends BindingSet,X extends java.lang.Exception>
- Returns:
- stream
-
close
public void close() throws X extends java.lang.Exception
Description copied from interface:CloseableIteration
Closes this iteration, freeing any resources that it is holding. If the iteration has already been closed then invoking this method has no effect.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceCloseableIteration<T extends BindingSet,X extends java.lang.Exception>
- Throws:
X extends java.lang.Exception
-
hasNext
public boolean hasNext() throws X extends java.lang.Exception
Description copied from interface:Iteration
Returns true if the iteration has more elements. (In other words, returns true ifIteration.next()
would return an element rather than throwing a NoSuchElementException.)
-
next
public T next() throws X extends java.lang.Exception
Description copied from interface:Iteration
Returns the next element in the iteration.
-
remove
public void remove() throws X extends java.lang.Exception
Description copied from interface:Iteration
Removes from the underlying collection the last element returned by the iteration (optional operation). This method can be called only once per call to next.
-
getTupleExpr
public TupleExpr getTupleExpr()
-
getTupleExprClone
public TupleExpr getTupleExprClone()
-
-