- All Superinterfaces:
ClosableIterator<RDFNode>,org.apache.jena.atlas.lib.Closeable,ExtendedIterator<RDFNode>,Iterator<RDFNode>,org.apache.jena.atlas.iterator.IteratorCloseable<RDFNode>
- All Known Implementing Classes:
ContNodeIteratorImpl,NodeIteratorImpl,SeqNodeIteratorImpl
An iterator which returns RDF nodes.
RDF iterators are standard Java iterators, except that they
have an extra method that returns specifically typed objects,
in this case RDF nodes, and have a close() method.
that should be called to free resources if the application does
not complete the iteration.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Terminate the iteration and free up resources.booleanhasNext()Determine if there any more values in the iteration.next()Return the next RDFNode of the iteration.nextNode()Return the next RDFNode of the iteration.voidremove()Unsupported Operation.Methods inherited from interface org.apache.jena.util.iterator.ExtendedIterator
andThen, filterDrop, filterKeep, forEach, mapWith, nextOptional, removeNext, toList, toSetMethods inherited from interface java.util.Iterator
forEachRemaining
-
Method Details
-
hasNext
boolean hasNext()Determine if there any more values in the iteration. -
next
Return the next RDFNode of the iteration.- Specified by:
nextin interfaceIterator<RDFNode>- Returns:
- The next RDFNode from the iteration.
- Throws:
NoSuchElementException- if there are no more nodes to be returned.
-
nextNode
Return the next RDFNode of the iteration.- Returns:
- The next RDFNode from the iteration.
- Throws:
NoSuchElementException- if there are no more nodes to be returned.
-
remove
Unsupported Operation.- Specified by:
removein interfaceIterator<RDFNode>- Throws:
NoSuchElementException
-
close
void close()Terminate the iteration and free up resources.Some implementations, e.g. on relational databases, hold resources while the iterator still exists. These will normally be freed when the iteration completes. However, if an application wishes to ensure they are freed without completing the iteration, this method should be called.
.- Specified by:
closein interfaceClosableIterator<RDFNode>- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-