public abstract class
PaginationIterable
extends Object
implements Iterable<T>
implements Iterable<T>
Iterable which handles pagination for iterating over set of objects.
Nested Class Summary
| class | PaginationIterable.Page<T, Q> | Represents set of items and optional continuation token to fetch additional items. | |
Public Constructor Summary
|
PaginationIterable(Optional<Q> startPage)
Creates an instance of
PaginationIterable |
Public Method Summary
| abstract Page<T, Q> |
getPage(Optional<Q> nextPage)
Return next set of objects based on optional pagination token.
|
| Iterator<T> |
iterator()
|
Inherited Method Summary
Public Constructors
public PaginationIterable (Optional<Q> startPage)
Creates an instance of PaginationIterable
Parameters
| startPage |
|---|
Public Methods
public abstract Page<T, Q> getPage (Optional<Q> nextPage)
Return next set of objects based on optional pagination token.
Parameters
| nextPage | pagination token |
|---|
Returns
PaginationIterable.Pagecontaining next set of objects and optional continuation token.
Throws
| IOException | if fetching next set of objects fails |
|---|