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

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

Name Description
RequestT
ResponseT
ResourceT
PageT
CollectionT

Constructors

AbstractFixedSizeCollection(List<PageT> pages, int collectionSize)

protected AbstractFixedSizeCollection(List<PageT> pages, int collectionSize)
Parameters
Name Description
pages List<PageT>
collectionSize int

Methods

createCollection(List<PageT> pages, int collectionSize)

protected abstract CollectionT createCollection(List<PageT> pages, int collectionSize)
Parameters
Name Description
pages List<PageT>
collectionSize int
Returns
Type Description
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
Type Description
int

getNextCollection()

public CollectionT getNextCollection()

Retrieves the next FixedSizeCollection using one or more API calls.

Returns
Type Description
CollectionT

getNextPageToken()

public String getNextPageToken()

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

Returns
Type Description
String

getValues()

public Iterable<ResourceT> getValues()

Returns an iterable over the elements in this FixedSizeCollection.

Returns
Type Description
Iterable<ResourceT>

hasNextCollection()

public boolean hasNextCollection()

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

Returns
Type Description
boolean