Package com.google.api.gax.paging
Class AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT extends AbstractPage<RequestT,ResponseT,ResourceT,PageT>,CollectionT extends AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT>>
java.lang.Object
com.google.api.gax.paging.AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT>
- All Implemented Interfaces:
FixedSizeCollection<ResourceT>
public abstract class AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT extends AbstractPage<RequestT,ResponseT,ResourceT,PageT>,CollectionT extends AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT>>
extends Object
implements FixedSizeCollection<ResourceT>
Partial implementation of
FixedSizeCollection.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFixedSizeCollection(List<PageT> pages, int collectionSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CollectionTcreateCollection(List<PageT> pages, int collectionSize) intReturns the number of elements in the collection.Retrieves the next FixedSizeCollection using one or more API calls.Returns a page token that can be passed into the API list method to retrieve additional elements.Returns an iterable over the elements in this FixedSizeCollection.booleanReturns true if there are more elements that can be retrieved from the API.
-
Constructor Details
-
AbstractFixedSizeCollection
-
-
Method Details
-
createCollection
-
getValues
Description copied from interface:FixedSizeCollectionReturns an iterable over the elements in this FixedSizeCollection.- Specified by:
getValuesin interfaceFixedSizeCollection<RequestT>
-
getNextCollection
Description copied from interface:FixedSizeCollectionRetrieves the next FixedSizeCollection using one or more API calls.- Specified by:
getNextCollectionin interfaceFixedSizeCollection<RequestT>
-
hasNextCollection
public boolean hasNextCollection()Description copied from interface:FixedSizeCollectionReturns true if there are more elements that can be retrieved from the API.- Specified by:
hasNextCollectionin interfaceFixedSizeCollection<RequestT>
-
getNextPageToken
Description copied from interface:FixedSizeCollectionReturns a page token that can be passed into the API list method to retrieve additional elements.- Specified by:
getNextPageTokenin interfaceFixedSizeCollection<RequestT>
-
getCollectionSize
public int getCollectionSize()Description copied from interface:FixedSizeCollectionReturns 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.- Specified by:
getCollectionSizein interfaceFixedSizeCollection<RequestT>
-