TResult - the result typepublic interface MongoIterable<TResult>
| Modifier and Type | Method and Description | 
|---|---|
| void | batchCursor(SingleResultCallback<AsyncBatchCursor<TResult>> callback)Provide the underlying  AsyncBatchCursorallowing fine grained control of the cursor. | 
| MongoIterable<TResult> | batchSize(int batchSize)Sets the number of documents to return per batch. | 
| void | first(SingleResultCallback<TResult> callback)Helper to return the first item in the iterator or null. | 
| void | forEach(Block<? super TResult> block,
       SingleResultCallback<Void> callback)Iterates over all documents in the view, applying the given block to each, and completing the returned future after all documents
 have been iterated, or an exception has occurred. | 
| <A extends Collection<? super TResult>> | into(A target,
    SingleResultCallback<A> callback)Iterates over all the documents, adding each to the given target. | 
| <U> MongoIterable<U> | map(Function<TResult,U> mapper)Maps this iterable from the source document type to the target document type. | 
void first(SingleResultCallback<TResult> callback)
callback - a callback that is passed the first item or null.void forEach(Block<? super TResult> block, SingleResultCallback<Void> callback)
block - the block to apply to each documentcallback - a callback that completed once the iteration has completed<A extends Collection<? super TResult>> void into(A target, SingleResultCallback<A> callback)
A - the collection typetarget - the collection to insert intocallback - a callback that will be passed the target containing all documents<U> MongoIterable<U> map(Function<TResult,U> mapper)
U - the target document typemapper - a function that maps from the source to the target document typeMongoIterable<TResult> batchSize(int batchSize)
batchSize - the batch sizevoid batchCursor(SingleResultCallback<AsyncBatchCursor<TResult>> callback)
AsyncBatchCursor allowing fine grained control of the cursor.callback - a callback that will be passed the AsyncBatchCursor