java.lang.Object
gg.xp.xivapi.pagination.XivApiPaginator<X>
- Type Parameters:
X-
- All Implemented Interfaces:
Iterator<X>
- Direct Known Subclasses:
XivApiListPaginator,XivApiSearchPaginator
public abstract sealed class XivApiPaginator<X extends XivApiObject>
extends Object
implements Iterator<X>
permits XivApiListPaginator<X>, XivApiSearchPaginator<X>
Base list/search paginator implementation. Not thread safe. Does not do any prefetching.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XivApiPaginator<X>.XivApiPageprotected final URIprotected final int -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract URIprotected abstract com.fasterxml.jackson.databind.JsonNodegetResultsNode(com.fasterxml.jackson.databind.JsonNode rootNode) protected booleanbooleanhasNext()next()stream()toBufferedIterator(int bufferSize) toBufferedStream(int bufferSize) toList()Methods 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
-
Field Details
-
originalUri
-
perPageItemCount
protected final int perPageItemCount -
currentPage
-
-
Method Details
-
getNextPageUri
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<X extends XivApiObject>
-
hasMorePages
protected boolean hasMorePages() -
next
- Specified by:
nextin interfaceIterator<X extends XivApiObject>
-
getResultsNode
protected abstract com.fasterxml.jackson.databind.JsonNode getResultsNode(com.fasterxml.jackson.databind.JsonNode rootNode) -
toList
-
stream
-
toBufferedIterator
-
toBufferedStream
-