- Type Parameters:
R- the result type of the slice content.
public interface Slice<R>
Represents a slice of query results — a chunk of data with informational navigation flags.
A Slice is the common base for both Window (cursor-based scrolling) and Page
(offset-based pagination). It provides access to the result content and flags indicating whether adjacent
results exist, without prescribing a specific navigation mechanism.
- Since:
- 1.11
-
Method Details
-
content
Returns the list of results in this slice. The list is immutable and never containsnullelements.- Returns:
- the results.
-
hasNext
boolean hasNext()Returnstrueif more results exist beyond this slice in the forward direction.- Returns:
- whether more results exist.
-
hasPrevious
boolean hasPrevious()Returnstrueif results exist before this slice.- Returns:
- whether previous results exist.
-