Class MongoIterable
On this page
io.realm.mongodb.mongo.iterable
The MongoIterable is the results from an operation, such as a 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
.
Method Summary
Modifier and Type | Method and Description |
---|---|
public RealmResultTask | first () Helper to return the first item in the iterator or null. |
public RealmResultTask | iterator () Returns a cursor of the operation represented by this iterable. |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass
,hashCode
,equals
,clone
,toString
,notify
,notifyAll
,wait
,wait
,wait
,finalize
Method Detail
first
public RealmResultTask first () |
---|
Helper to return the first item in the iterator or null.The result is wrapped in a Returns a task containing the first item or null. |
iterator
public RealmResultTask iterator () |
---|
Returns a cursor of the operation represented by this iterable.The result is wrapped in a Returns an asynchronous task with cursor of the operation represented by this iterable. |