Package com.google.api.gax.paging
Interface Page<ResourceT>
- All Known Subinterfaces:
AsyncPage<ResourceT>
- All Known Implementing Classes:
AbstractPage
public interface Page<ResourceT>
A Page object wraps an API list method response.
Callers can iterate over the Page object to get all elements returned in the page. The Page object also provides methods to retrieve additional pages using the page token, and to get the API request and response objects.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the next Page object using the next page token, ornullif there are no more pages.Returns the next page token from the response, or an empty string if there are no more pages.Returns an iterable over the elements in this page.booleanReturns true if there are more pages that can be retrieved from the API.Returns an iterable that traverses all the elements of the underlying data source.Returns a stream that traverses all the elements of the underlying data source.Returns a stream over the elements in this page.
-
Method Details
-
hasNextPage
boolean hasNextPage()Returns true if there are more pages that can be retrieved from the API. -
getNextPageToken
String getNextPageToken()Returns the next page token from the response, or an empty string if there are no more pages. -
getNextPage
Retrieves the next Page object using the next page token, ornullif there are no more pages. The hasNextPage() method can be used to check if a Page object is available. -
iterateAll
Returns an iterable that traverses all the elements of the underlying data source. The data is fetched lazily page by page, where each page may contain multiple elements. A new page is fetched whenever the elements of any particular page are exhausted. -
getValues
Returns an iterable over the elements in this page. -
streamAll
Returns a stream that traverses all the elements of the underlying data source. The data is fetched lazily page by page, where each page may contain multiple elements. A new page is fetched whenever the elements of any particular page are exhausted. -
streamValues
Returns a stream over the elements in this page.
-