Interface PageResponse<T>
-
- All Superinterfaces:
Iterable<T>
- All Known Implementing Classes:
ContentRestrictionsPageResponse
,GraphQLPageResponse
,PageResponseImpl
,RestList
,SearchPageResponse
@ExperimentalApi public interface PageResponse<T> extends Iterable<T>
A response to a page request, used in pagination. Wraps a list and provides information on whether there are more results.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Cursor
getNextCursor()
PageRequest
getPageRequest()
default Cursor
getPrevCursor()
List<T>
getResults()
boolean
hasMore()
Indicates whether the source has more results after this page.int
size()
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
size
int size()
- Returns:
- the number of results in this page of results
-
hasMore
boolean hasMore()
Indicates whether the source has more results after this page.- Returns:
- true if there are more results
-
getPageRequest
PageRequest getPageRequest()
- Returns:
- the request used to produce this response
-
getNextCursor
default Cursor getNextCursor()
- Returns:
- the identifier which is used to skip results from a previous query when paginating in forward direction.
- Since:
- 7.18
-
getPrevCursor
default Cursor getPrevCursor()
- Returns:
- the identifier which is used to skip results from a previous query when paginating in backward direction.
- Since:
- 7.18
-
-