Class AkashPagedIterator<T>

java.lang.Object
cloud.quasarch.akash.impl.pagination.AkashPagedIterator<T>
Type Parameters:
T - the type of data
All Implemented Interfaces:
Iterator<T>

public class AkashPagedIterator<T> extends Object implements Iterator<T>
Iterator for AkashPagedResponse
  • Constructor Details

    • AkashPagedIterator

      public AkashPagedIterator(Function<String,PagedResponse<T>> dataFetcher, PagedResponse<T> firstPage)
      constructor
      Parameters:
      dataFetcher - function that knows how to fetch more data
      firstPage - the initial, already loaded, page
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>