Interface PagedResponse<T>
- All Superinterfaces:
Iterable<T>
- All Known Implementing Classes:
PagedResponseImpl
A response to a paged request, used in pagination. Wraps a list and provides information on whether there are more
results.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether the source has more results after this page.<M> PagedResponse<M>
Allows you to map a paged response of T into Mint
size()
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getResults
- Returns:
- the results
-
size
int size()- Returns:
- the number of results in this page of results
-
hasNextPage
boolean hasNextPage()Indicates whether the source has more results after this page.- Returns:
- true if there are more results
-
getPagedRequest
PagedRequest getPagedRequest()- Returns:
- the request used to produce this response
-
map
Allows you to map a paged response of T into M- Type Parameters:
M
- the output type- Parameters:
mapper
- the mapping function- Returns:
- a paged response of M
-
findFirst
- Returns:
- an optional first element of the paged response
-