Class MappingIterable<U,​V>

  • Type Parameters:
    U -
    V -
    All Implemented Interfaces:
    com.mongodb.client.MongoIterable<V>, java.lang.Iterable<V>

    public class MappingIterable<U,​V>
    extends java.lang.Object
    implements com.mongodb.client.MongoIterable<V>
    Copied from the Java driver
    Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Summary

      Constructors 
      Constructor Description
      MappingIterable​(com.mongodb.client.MongoIterable<U> iterable, com.mongodb.Function<U,​V> mapper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MappingIterable<U,​V> batchSize​(int batchSize)  
      com.mongodb.client.MongoCursor<V> cursor()  
      V first()  
      void forEach​(java.util.function.Consumer<? super V> block)  
      <A extends java.util.Collection<? super V>>
      A
      into​(A target)  
      com.mongodb.client.MongoCursor<V> iterator()  
      <W> com.mongodb.client.MongoIterable<W> map​(com.mongodb.Function<V,​W> newMap)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        spliterator
    • Constructor Detail

      • MappingIterable

        public MappingIterable​(com.mongodb.client.MongoIterable<U> iterable,
                               com.mongodb.Function<U,​V> mapper)
    • Method Detail

      • iterator

        public com.mongodb.client.MongoCursor<V> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<U>
        Specified by:
        iterator in interface com.mongodb.client.MongoIterable<U>
      • cursor

        public com.mongodb.client.MongoCursor<V> cursor()
        Specified by:
        cursor in interface com.mongodb.client.MongoIterable<U>
      • first

        @Nullable
        public V first()
        Specified by:
        first in interface com.mongodb.client.MongoIterable<U>
      • forEach

        public void forEach​(java.util.function.Consumer<? super V> block)
        Specified by:
        forEach in interface java.lang.Iterable<U>
      • into

        public <A extends java.util.Collection<? super V>> A into​(A target)
        Specified by:
        into in interface com.mongodb.client.MongoIterable<U>
      • batchSize

        public MappingIterable<U,​V> batchSize​(int batchSize)
        Specified by:
        batchSize in interface com.mongodb.client.MongoIterable<U>
      • map

        public <W> com.mongodb.client.MongoIterable<W> map​(com.mongodb.Function<V,​W> newMap)
        Specified by:
        map in interface com.mongodb.client.MongoIterable<U>