Module gg.xp.xivapi

Class XivApiPaginator<X extends XivApiObject>

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.
  • Field Details

  • Method Details

    • getNextPageUri

      protected abstract URI getNextPageUri()
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<X extends XivApiObject>
    • hasMorePages

      protected boolean hasMorePages()
    • next

      public X next()
      Specified by:
      next in interface Iterator<X extends XivApiObject>
    • getResultsNode

      protected abstract com.fasterxml.jackson.databind.JsonNode getResultsNode(com.fasterxml.jackson.databind.JsonNode rootNode)
    • toList

      public List<X> toList()
    • stream

      public Stream<X> stream()
    • toBufferedIterator

      public Iterator<X> toBufferedIterator(int bufferSize)
    • toBufferedStream

      public Stream<X> toBufferedStream(int bufferSize)