Class RemoteMongoIterableImpl<ResultT>

    • Method Detail

      • map

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

        public Task<Void> forEach​(Block<? super ResultT> block)
        Description copied from interface: RemoteMongoIterable
        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.

        Specified by:
        forEach in interface RemoteMongoIterable<ResultT>
        Parameters:
        block - the block to apply to each document of type T.
        Returns:
        a task that completes when the iteration over all documents has completed.
      • into

        public <A extends Collection<? super ResultT>> Task<A> into​(A target)
        Description copied from interface: RemoteMongoIterable
        Iterates over all the documents, adding each to the given target.
        Specified by:
        into in interface RemoteMongoIterable<ResultT>
        Type Parameters:
        A - the collection type
        Parameters:
        target - the collection to insert into
        Returns:
        a task containing the target.