Interface StmtIterator

All Superinterfaces:
ClosableIterator<Statement>, org.apache.jena.atlas.lib.Closeable, ExtendedIterator<Statement>, Iterator<Statement>, org.apache.jena.atlas.iterator.IteratorCloseable<Statement>
All Known Implementing Classes:
StmtIteratorImpl

public interface StmtIterator extends ExtendedIterator<Statement>
An iterator which returns RDF Statements.

RDF iterators are standard Java iterators, except that they have extras method to return specifically typed objects, in this case RDF Statements and have a close() method that should be called to free resources if the application does not complete the iteration.

  • Method Details

    • nextStatement

      Statement nextStatement() throws NoSuchElementException
      Return the next Statement of the iteration.
      Returns:
      The next Resource from the iteration.
      Throws:
      NoSuchElementException - if there are no more to be returned.
    • toModel

      default Model toModel()
      Answer a Model of the [remaining] Statements of this iterator, consuming this iterator.