Module gg.xp.xivapi
Package gg.xp.xivapi.pagination
Class XivApiListPaginator<X extends XivApiObject>
java.lang.Object
gg.xp.xivapi.pagination.XivApiPaginator<X>
gg.xp.xivapi.pagination.XivApiListPaginator<X>
- Type Parameters:
X-
- All Implemented Interfaces:
Iterator<X>
Raw list iterator. This is a dumb implementation that does not parallelize or readahead. It will request a new
page only when the existing page has been exhausted. The
XivApiPaginator.hasNext() method may block until the next
page has been returned.
This implementation is not thread-safe. It should be accessed only by a single thread.
It is implemented as an iterator-of-iterators, where each page is an iterator, and the combined pagination
-
Nested Class Summary
Nested classes/interfaces inherited from class gg.xp.xivapi.pagination.XivApiPaginator
XivApiPaginator.XivApiPage -
Field Summary
Fields inherited from class gg.xp.xivapi.pagination.XivApiPaginator
currentPage, originalUri, perPageItemCount -
Constructor Summary
ConstructorsConstructorDescriptionXivApiListPaginator(XivApiClient client, com.fasterxml.jackson.databind.JsonNode firstResponse, URI originalUri, BiPredicate<Integer, X> stopCondition, FieldMapper<X> mapper, int perPageItemCount, ListCacheMode cacheMode) -
Method Summary
Modifier and TypeMethodDescriptionprotected URIprotected com.fasterxml.jackson.databind.JsonNodegetResultsNode(com.fasterxml.jackson.databind.JsonNode rootNode) Methods inherited from class gg.xp.xivapi.pagination.XivApiPaginator
hasMorePages, hasNext, next, stream, toBufferedIterator, toBufferedStream, toListMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
XivApiListPaginator
public XivApiListPaginator(XivApiClient client, com.fasterxml.jackson.databind.JsonNode firstResponse, URI originalUri, BiPredicate<Integer, X> stopCondition, FieldMapper<X> mapper, int perPageItemCount, ListCacheMode cacheMode)
-
-
Method Details
-
getNextPageUri
- Specified by:
getNextPageUriin classXivApiPaginator<X extends XivApiObject>
-
getResultsNode
protected com.fasterxml.jackson.databind.JsonNode getResultsNode(com.fasterxml.jackson.databind.JsonNode rootNode) - Specified by:
getResultsNodein classXivApiPaginator<X extends XivApiObject>
-