Class PageImpl<T> (2.39.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

Name Description
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
Name Description
pageTokenOption T

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

cursor String

the cursor for the next page

optionMap Map<T,?>

the previous options map

Returns
Type Description
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
Name Description
pageFetcher NextPageFetcher<T>
cursor String
results Iterable<T>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getNextPage()

public Page<T> getNextPage()
Returns
Type Description
Page<T>

getNextPageToken()

public String getNextPageToken()
Returns
Type Description
String

getValues()

public Iterable<T> getValues()
Returns
Type Description
Iterable<T>

hasNextPage()

public boolean hasNextPage()
Returns
Type Description
boolean

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

iterateAll()

public Iterable<T> iterateAll()
Returns
Type Description
Iterable<T>