Interface RemoteMongoIterable<ResultT>

    • Method Detail

      • iterator

        Task<RemoteMongoCursor<ResultT>> iterator()
        Returns a cursor of the operation represented by this iterable.
        a cursor of the operation represented by this iterable.
      • first

        Task<ResultT> first()
        Helper to return the first item in the iterator or null.
        a task containing the first item or null.
      • map

        <U> RemoteMongoIterable<U> map​(Function<ResultT,​U> mapper)
        Maps this iterable from the source document type to the target document type.
        Type Parameters:
        U - the target document type
        mapper - a function that maps from the source to the target document type
        an iterable which maps T to U
      • forEach

        Task<Void> forEach​(Block<? super ResultT> block)
        Iterates over all documents in the view, applying the given block to each.

        Similar to map but the function is fully encapsulated with no returned result.

        block - the block to apply to each document of type T.
        a task that completes when the iteration over all documents has completed.
      • into

        <A extends Collection<? super ResultT>> Task<A> into​(A target)
        Iterates over all the documents, adding each to the given target.
        Type Parameters:
        A - the collection type
        target - the collection to insert into
        a task containing the target.