Interface PaginatedResult<R>
- Type Parameters:
R- the item type
A paginated result with an optional cursor for the next page.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <R> PaginatedResult.Builder<R> builder()booleanReturnstrueif the requested cursor was valid: either absent (first page) or found among the underlying items.default booleanhasMore()Returnstrueif there are more items beyond this page.items()The items on this page.@Nullable StringCursor for the next page, ornullif this is the last page.static <R> PaginatedResult<R>
-
Method Details
-
items
The items on this page. -
nextCursor
@Nullable String nextCursor()Cursor for the next page, ornullif this is the last page. -
hasMore
default boolean hasMore()Returnstrueif there are more items beyond this page. -
cursorValid
boolean cursorValid()Returnstrueif the requested cursor was valid: either absent (first page) or found among the underlying items.falsemeans a non-null cursor matched nothing, and per the MCP pagination spec the caller SHOULD raise -32602 (Invalid params). -
builder
-
of
-