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>
FixedSizeCollection.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFixedSizeCollection(List<PageT> pages,
int collectionSize) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract CollectionT |
createCollection(List<PageT> pages,
int collectionSize) |
int |
getCollectionSize()
Returns the number of elements in the collection.
|
CollectionT |
getNextCollection()
Retrieves the next FixedSizeCollection using one or more API calls.
|
String |
getNextPageToken()
Returns a page token that can be passed into the API list method to retrieve additional
elements.
|
Iterable<ResourceT> |
getValues()
Returns an iterable over the elements in this FixedSizeCollection.
|
boolean |
hasNextCollection()
Returns true if there are more elements that can be retrieved from the API.
|
protected abstract CollectionT createCollection(List<PageT> pages, int collectionSize)
public Iterable<ResourceT> getValues()
FixedSizeCollectiongetValues in interface FixedSizeCollection<ResourceT>public CollectionT getNextCollection()
FixedSizeCollectiongetNextCollection in interface FixedSizeCollection<ResourceT>public boolean hasNextCollection()
FixedSizeCollectionhasNextCollection in interface FixedSizeCollection<ResourceT>public String getNextPageToken()
FixedSizeCollectiongetNextPageToken in interface FixedSizeCollection<ResourceT>public int getCollectionSize()
FixedSizeCollectiongetCollectionSize in interface FixedSizeCollection<ResourceT>