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 |
---|---|
<any> |
first()
Helper to return the first item in the iterator or null.
|
<any> |
iterator()
Returns a cursor of the operation represented by this iterable.
|
public <any> iterator()
The result is wrapped in a Task
since the iterator should be capable of
asynchronously retrieve documents from the server.
public <any> first()
The result is wrapped in a Task
since the iterator should be capable of
asynchronously retrieve documents from the server.