Module Mal4J

Class PaginatedIterator<T>

java.lang.Object
dev.katsute.mal4j.PaginatedIterator<T>
Type Parameters:
T - type
All Implemented Interfaces:
Iterator<T>

public abstract class PaginatedIterator<T> extends Object implements Iterator<T>
Represents a paged response.
Since:
1.0.0
Version:
2.10.0
Author:
Katsute
  • Constructor Details

    • PaginatedIterator

      public PaginatedIterator()
  • Method Details

    • hasNext

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

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

      public final void remove()
      Specified by:
      remove in interface Iterator<T>
    • toList

      public final List<T> toList()
      Returns the current page as a list.
      Returns:
      list
      Since:
      1.0.0
    • toSet

      public final Set<T> toSet()
      Returns the current page as a set.
      Returns:
      set
      Since:
      1.0.0