org.eclipse.rdf4j.workbench.commands

## 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 Summary

    Constructors
    Constructor and Description
    `ResultCursor(int offset, int limit, boolean render)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `advance()` Advances the cursor, incrementing the total count, and moving other internal counters.
    `int` | `getRenderedResultCount()` Gets the number of results that were actually rendered.
    `int` | `getTotalResultCount()` Gets the total number of results.
    `boolean` | `mayRender()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResultCursor

          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 Detail

    - #### getTotalResultCount

          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

          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

          public boolean mayRender()

      Returns:
        whether it is allowed to render the next result

    - #### advance

          public void advance()

      Advances the cursor, incrementing the total count, and moving other internal counters.

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.