public static final class SpannerRpc.Paginated<T>
Represents results from paginated RPCs, i.e., those where up to a maximum number of items is returned from each call and a followup call must be made to fetch more.
Type Parameter | |
---|---|
Name | Description |
T |
Constructors
Paginated(Iterable<T> results, String nextPageToken)
public Paginated(Iterable<T> results, String nextPageToken)
Creates a new page of results.
Parameters | |
---|---|
Name | Description |
results | Iterable<T> the result, or null for no results. |
nextPageToken | String the token for the next page of results, or null if no more pages exist |
Methods
getNextPageToken()
public String getNextPageToken()
Returns the token to use in the request for the next page, or null if this is the last page.
Returns | |
---|---|
Type | Description |
String |
getResults()
public Iterable<T> getResults()
Returns the current page of results. Always returns non-null; if a null "results" was passed
to the constructor, a default empty Iterable
will be returned.
Returns | |
---|---|
Type | Description |
Iterable<T> |