Class ExploreServlet.ResultCursor
java.lang.Object
org.eclipse.rdf4j.workbench.commands.ExploreServlet.ResultCursor
- Enclosing class:
- ExploreServlet
Class for keeping track of location within the result set, relative to offset and limit.
- Author:
- Dale Visser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
advance()
Advances the cursor, incrementing the total count, and moving other internal counters.int
Gets the number of results that were actually rendered.int
Gets the total number of results.boolean
-
Constructor Details
-
ResultCursor
public ResultCursor(int offset, int limit, boolean render) - Parameters:
offset
- the desired offset at which rendering should startlimit
- the desired maximum number of results to renderrender
- if false, suppresses any rendering
-
-
Method Details
-
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.
-