Class Paged<X>

  • Type Parameters:
    X - Type of item
    All Implemented Interfaces:
    Iterator<X>

    public final class Paged<X>
    extends Object
    implements Iterator<X>
    Paged iterator. Elements will continue to be provided so long as next produces non-empty iterators.

    There is no thread-safety guarantee.

    Since:
    0.49
    • Constructor Detail

      • Paged

        public Paged​(Iterator<? extends X> first,
                     Func<? super Iterator<? extends X>,​? extends Iterator<? extends X>> next)
        Ctor.
        Parameters:
        first - First element.
        next - Function to get the next element.
    • Method Detail

      • hasNext

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

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