Package com.fauna.client
Class PageIterator<E>
- java.lang.Object
-
- com.fauna.client.PageIterator<E>
-
-
Constructor Summary
Constructors Constructor Description PageIterator(FaunaClient client, Query fql, java.lang.Class<E> resultClass, QueryOptions options)
Construct a new PageIterator.PageIterator(FaunaClient client, Page<E> page, java.lang.Class<E> resultClass, QueryOptions options)
-
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.
-
-
-
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.
-
PageIterator
public PageIterator(FaunaClient client, Page<E> page, java.lang.Class<E> resultClass, QueryOptions options)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<E>
-
next
public Page<E> next()
Get the next Page.- Specified by:
next
in interfacejava.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.
-
-