java.lang.Object
org.kohsuke.github.PagedIterator<T>
- Type Parameters:
T
- the type parameter
- All Implemented Interfaces:
Iterator<T>
Iterator over a paginated data source. Iterates of the content items of each page, automatically requesting new pages
as needed.
Aside from the normal iterator operation, this method exposes nextPage()
and nextPageArray()
that
allows the caller to retrieve entire pages.
This class is not thread-safe. Any one instance should only be called from a single thread.
- Author:
- Kohsuke Kawaguchi
-
Field Details
-
base
The base.
-
-
Method Details
-
wrapUp
This poorly named method, initializes items with local data after they are fetched. It is up to the implementer to decide what local data to apply.- Parameters:
page
- the page of items to be initialized
-
hasNext
public boolean hasNext() -
next
-
nextPage
Gets the next page worth of data.- Returns:
- the list
-