ResultT - The type to which this iterable will decode documents.public abstract class MongoIterable<ResultT> extends Object
find() or an
aggregate() query.
This class somewhat mimics the behavior of an Iterable but given its results are
obtained asynchronously, its values are wrapped inside a Task.
| Modifier and Type | Method and Description |
|---|---|
RealmResultTask<ResultT> |
first()
Helper to return the first item in the iterator or null.
|
RealmResultTask<MongoCursor<ResultT>> |
iterator()
Returns a cursor of the operation represented by this iterable.
|
public RealmResultTask<MongoCursor<ResultT>> iterator()
The result is wrapped in a Task since the iterator should be capable of
asynchronously retrieve documents from the server.
public RealmResultTask<ResultT> first()
The result is wrapped in a Task since the iterator should be capable of
asynchronously retrieve documents from the server.