public abstract class AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT extends AbstractPage<RequestT,ResponseT,ResourceT,PageT>,CollectionT extends AbstractFixedSizeCollection<RequestT,ResponseT,ResourceT,PageT,CollectionT>> extends java.lang.Object implements FixedSizeCollection<ResourceT>
FixedSizeCollection
.Modifier | Constructor and Description |
---|---|
protected |
AbstractFixedSizeCollection(java.util.List<PageT> pages,
int collectionSize) |
Modifier and Type | Method and Description |
---|---|
protected abstract CollectionT |
createCollection(java.util.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.
|
java.lang.String |
getNextPageToken()
Returns a page token that can be passed into the API list method to retrieve additional
elements.
|
java.lang.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 AbstractFixedSizeCollection(java.util.List<PageT> pages, int collectionSize)
protected abstract CollectionT createCollection(java.util.List<PageT> pages, int collectionSize)
public java.lang.Iterable<ResourceT> getValues()
FixedSizeCollection
getValues
in interface FixedSizeCollection<ResourceT>
public CollectionT getNextCollection()
FixedSizeCollection
getNextCollection
in interface FixedSizeCollection<ResourceT>
public boolean hasNextCollection()
FixedSizeCollection
hasNextCollection
in interface FixedSizeCollection<ResourceT>
public java.lang.String getNextPageToken()
FixedSizeCollection
getNextPageToken
in interface FixedSizeCollection<ResourceT>
public int getCollectionSize()
FixedSizeCollection
getCollectionSize
in interface FixedSizeCollection<ResourceT>