Class ExploreServlet.ResultCursor

java.lang.Object
org.eclipse.rdf4j.workbench.commands.ExploreServlet.ResultCursor
Enclosing class:
ExploreServlet

protected class ExploreServlet.ResultCursor extends Object
Class for keeping track of location within the result set, relative to offset and limit.
Author:
Dale Visser
  • Constructor Details Link icon

    • ResultCursor Link icon

      public ResultCursor(int offset, int limit, boolean render)
      Parameters:
      offset - the desired offset at which rendering should start
      limit - the desired maximum number of results to render
      render - if false, suppresses any rendering
  • Method Details Link icon

    • getTotalResultCount Link icon

      public int getTotalResultCount()
      Gets the total number of results. Only meant to be called after advance() has been called for all results in the set.
      Returns:
      the number of times advance() has been called
    • getRenderedResultCount Link icon

      public int getRenderedResultCount()
      Gets the number of results that were actually rendered. Only meant to be called after advance() has been called for all results in the set.
      Returns:
      the number of times advance() has been called when this.mayRender() evaluated to true
    • mayRender Link icon

      public boolean mayRender()
      Returns:
      whether it is allowed to render the next result
    • advance Link icon

      public void advance()
      Advances the cursor, incrementing the total count, and moving other internal counters.