Class RowSetMem

java.lang.Object
org.apache.jena.sparql.exec.RowSetMem
All Implemented Interfaces:
Iterator<Binding>, org.apache.jena.atlas.iterator.IteratorCloseable<Binding>, org.apache.jena.atlas.lib.Closeable, RowSet, RowSetRewindable

public class RowSetMem extends Object implements RowSetRewindable
A row set held in-memory which is rewindable and peekable
  • Method Details

    • create

      public static RowSetRewindable create(RowSet rowSet)
    • hasNext

      public boolean hasNext()
      Is there another possibility?
      Specified by:
      hasNext in interface Iterator<Binding>
      Specified by:
      hasNext in interface RowSet
    • next

      public Binding next()
      Moves onto the next result possibility.
      Specified by:
      next in interface Iterator<Binding>
      Specified by:
      next in interface RowSet
    • rewind

      public void rewind()
      Reset this result set back to the beginning
    • reset

      public void reset()
      Specified by:
      reset in interface RowSetRewindable
    • getRowNumber

      public long getRowNumber()
      Return the "row" number for the current iterator item
      Specified by:
      getRowNumber in interface RowSet
    • size

      public long size()
      Return the number of rows
      Specified by:
      size in interface RowSetRewindable
    • getResultVars

      public List<Var> getResultVars()
      Get the variable names for the projection
      Specified by:
      getResultVars in interface RowSet
    • peek

      public Binding peek()
    • close

      public void close()
      Description copied from interface: RowSet
      Normally a RowSet is processed until complete which implicitly closes any underlying resources. This "close" operation exists to explicitly do this in cases where it does onto automatically. There is no need to close RowSets normally - it is the QueryExec that should be closed.
      Specified by:
      close in interface org.apache.jena.atlas.lib.Closeable
      Specified by:
      close in interface RowSet