T - the value type that the page holds@InternalApi public class PageImpl<T> extends Object implements com.google.api.gax.paging.Page<T>, Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
PageImpl.NextPageFetcher<T>
Interface for fetching the next page of results from the service.
|
| Constructor and Description |
|---|
PageImpl(PageImpl.NextPageFetcher<T> pageFetcher,
String cursor,
Iterable<T> results)
Creates a
PageImpl object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
com.google.api.gax.paging.Page<T> |
getNextPage() |
String |
getNextPageToken() |
Iterable<T> |
getValues() |
int |
hashCode() |
boolean |
hasNextPage() |
Iterable<T> |
iterateAll() |
static <T> Map<T,Object> |
nextRequestOptions(T pageTokenOption,
String cursor,
Map<T,?> optionMap)
Utility method to construct the options map for the next page request.
|
public PageImpl(PageImpl.NextPageFetcher<T> pageFetcher, String cursor, Iterable<T> results)
PageImpl object. In order for the object to be serializable the results parameter must be serializable.public Iterable<T> getValues()
getValues in interface com.google.api.gax.paging.Page<T>public Iterable<T> iterateAll()
iterateAll in interface com.google.api.gax.paging.Page<T>public boolean hasNextPage()
hasNextPage in interface com.google.api.gax.paging.Page<T>public String getNextPageToken()
getNextPageToken in interface com.google.api.gax.paging.Page<T>public com.google.api.gax.paging.Page<T> getNextPage()
getNextPage in interface com.google.api.gax.paging.Page<T>public static <T> Map<T,Object> nextRequestOptions(T pageTokenOption, String cursor, Map<T,?> optionMap)
T - the value type that the page holds. Instances of T should be SerializablepageTokenOption - the key for the next page cursor option in the options mapcursor - the cursor for the next pageoptionMap - the previous options mapCopyright © 2019 Google LLC. All rights reserved.