Class PageImpl<T> (2.11.0)

public class PageImpl<T> implements Page<T>, Serializable

Base implementation for Google Cloud paginated results.

Inheritance

Object > PageImpl<T>

Implements

Page<T>, Serializable

Type Parameter

NameDescription
T

Static Methods

<T>nextRequestOptions(T pageTokenOption, String cursor, Map<T,?> optionMap)

public static Map<T,Object> <T>nextRequestOptions(T pageTokenOption, String cursor, Map<T,?> optionMap)

Utility method to construct the options map for the next page request.

Parameters
NameDescription
pageTokenOptionT

the key for the next page cursor option in the options map

cursorString

the cursor for the next page

optionMapMap<T,?>

the previous options map

Returns
TypeDescription
Map<T,Object>

the options map for the next page request

Constructors

PageImpl(PageImpl.NextPageFetcher<T> pageFetcher, String cursor, Iterable<T> results)

public PageImpl(PageImpl.NextPageFetcher<T> pageFetcher, String cursor, Iterable<T> results)

Creates a PageImpl object. In order for the object to be serializable the results parameter must be serializable.

Parameters
NameDescription
pageFetcherNextPageFetcher<T>
cursorString
resultsIterable<T>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getNextPage()

public Page<T> getNextPage()
Returns
TypeDescription
Page<T>

getNextPageToken()

public String getNextPageToken()
Returns
TypeDescription
String

getValues()

public Iterable<T> getValues()
Returns
TypeDescription
Iterable<T>

hasNextPage()

public boolean hasNextPage()
Returns
TypeDescription
boolean

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

iterateAll()

public Iterable<T> iterateAll()
Returns
TypeDescription
Iterable<T>