Class AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT> (2.30.1)

public abstract class AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT> implements FixedSizeCollection<ResourceT>

Partial implementation of FixedSizeCollection.

Inheritance

java.lang.Object > AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT>

Implements

com.google.api.gax.paging.FixedSizeCollection<ResourceT>

Type Parameters

NameDescription
RequestT
ResponseT
ResourceT
PageT
CollectionT

Constructors

AbstractFixedSizeCollection(List<PageT> pages, int collectionSize)

protected AbstractFixedSizeCollection(List<PageT> pages, int collectionSize)
Parameters
NameDescription
pagesList<PageT>
collectionSizeint

Methods

createCollection(List<PageT> pages, int collectionSize)

protected abstract CollectionT createCollection(List<PageT> pages, int collectionSize)
Parameters
NameDescription
pagesList<PageT>
collectionSizeint
Returns
TypeDescription
CollectionT

getCollectionSize()

public int getCollectionSize()

Returns the number of elements in the collection. This will be equal to the collectionSize parameter used at construction unless there are no elements remaining to be retrieved.

Returns
TypeDescription
int

getNextCollection()

public CollectionT getNextCollection()

Retrieves the next FixedSizeCollection using one or more API calls.

Returns
TypeDescription
CollectionT

getNextPageToken()

public String getNextPageToken()

Returns a page token that can be passed into the API list method to retrieve additional elements.

Returns
TypeDescription
String

getValues()

public Iterable<ResourceT> getValues()

Returns an iterable over the elements in this FixedSizeCollection.

Returns
TypeDescription
Iterable<ResourceT>

hasNextCollection()

public boolean hasNextCollection()

Returns true if there are more elements that can be retrieved from the API.

Returns
TypeDescription
boolean