java.lang.Object
org.apache.jena.sparql.util.PrintSerializableBase
org.apache.jena.sparql.engine.iterator.QueryIteratorBase
- All Implemented Interfaces:
Iterator<Binding>
,org.apache.jena.atlas.io.Printable
,org.apache.jena.atlas.iterator.IteratorCloseable<Binding>
,org.apache.jena.atlas.lib.Closeable
,QueryIterator
,PrintSerializable
- Direct Known Subclasses:
QueryIter
,QueryIteratorResultSet
,QueryIteratorWrapper
This class provides the general machinery for iterators. This includes
- autoclose when the iterator runs out
- async cancellation
- final
hasNext()
andnext()
to check for cancellation. Subclasses provide two operations:hasNextBinding()
,moveToNextBinding()
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
cancel()
Cancel this iterator : this is called, possibly asynchronously, to cancel an iterator.void
close()
final boolean
hasNext()
final - subclasses implement hasNextBinding()final Binding
next()
final - autoclose and registration relies on it - implement moveToNextBinding()final Binding
final - subclasses implement moveToNextBinding()final void
remove()
Methods inherited from class org.apache.jena.sparql.util.PrintSerializableBase
output, toString, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
Methods inherited from interface org.apache.jena.atlas.io.Printable
output
Methods inherited from interface org.apache.jena.sparql.util.PrintSerializable
output, toString
Methods inherited from interface org.apache.jena.sparql.engine.QueryIterator
isJoinIdentity
-
Method Details
-
hasNext
public final boolean hasNext()final - subclasses implement hasNextBinding() -
next
final - autoclose and registration relies on it - implement moveToNextBinding() -
nextBinding
final - subclasses implement moveToNextBinding()- Specified by:
nextBinding
in interfaceQueryIterator
-
remove
public final void remove() -
close
public void close()- Specified by:
close
in interfaceorg.apache.jena.atlas.lib.Closeable
-
cancel
public final void cancel()Cancel this iterator : this is called, possibly asynchronously, to cancel an iterator.- Specified by:
cancel
in interfaceQueryIterator
-