Class PageIterator<E>

  • Type Parameters:
    E -
    All Implemented Interfaces:
    java.util.Iterator<Page<E>>

    public class PageIterator<E>
    extends java.lang.Object
    implements java.util.Iterator<Page<E>>
    PageIterator iterates over paged responses from Fauna, the default page size is 16.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<E> flatten()
      Return an iterator that iterates directly over the items that make up the page contents.
      boolean hasNext()  
      Page<E> next()
      Get the next Page.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Constructor Detail

      • PageIterator

        public PageIterator​(FaunaClient client,
                            Query fql,
                            java.lang.Class<E> resultClass,
                            QueryOptions options)
        Construct a new PageIterator.
        Parameters:
        client - A client that makes requests to Fauna.
        fql - The FQL query.
        resultClass - The class of the elements returned from Fauna (i.e. the rows).
        options - (optionally) pass in QueryOptions.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<E>
      • next

        public Page<E> next()
        Get the next Page.
        Specified by:
        next in interface java.util.Iterator<E>
        Returns:
        The next Page of elements E.
      • flatten

        public java.util.Iterator<E> flatten()
        Return an iterator that iterates directly over the items that make up the page contents.
        Returns:
        An iterator of E.