Class SpannerRpc.Paginated<T> (6.62.0)

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.

Inheritance

java.lang.Object > SpannerRpc.Paginated<T>

Type Parameter

NameDescription
T

Constructors

Paginated(Iterable<T> results, String nextPageToken)

public Paginated(Iterable<T> results, String nextPageToken)

Creates a new page of results.

Parameters
NameDescription
resultsIterable<T>

the result, or null for no results.

nextPageTokenString

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
TypeDescription
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
TypeDescription
Iterable<T>