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 voidcancel()Cancel this iterator : this is called, possibly asynchronously, to cancel an iterator.voidclose()final booleanhasNext()final - subclasses implement hasNextBinding()final Bindingnext()final - autoclose and registration relies on it - implement moveToNextBinding()final Bindingfinal - subclasses implement moveToNextBinding()final voidremove()Methods inherited from class org.apache.jena.sparql.util.PrintSerializableBase
output, toString, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemainingMethods inherited from interface org.apache.jena.atlas.io.Printable
outputMethods inherited from interface org.apache.jena.sparql.util.PrintSerializable
output, toStringMethods 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:
nextBindingin interfaceQueryIterator
-
remove
public final void remove() -
close
public void close()- Specified by:
closein 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:
cancelin interfaceQueryIterator
-