signature:
public class Observable { /** * Returns a { @ link Future } representing the only value emitted by this { @ code Observable } .
 * < img width = " 640 " height = " 312 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / toFuture . o . png " alt = " " >
 * If the { @ link Observable } emits more than one item , { @ link java . util . concurrent . Future } will receive an
 * { @ link java . lang . IndexOutOfBoundsException } . If the { @ link Observable } is empty , { @ link java . util . concurrent . Future }
 * will receive an { @ link java . util . NoSuchElementException } . The { @ code Observable } source has to terminate in order
 * for the returned { @ code Future } to terminate as well .
 * If the { @ code Observable } may emit more than one item , use { @ code Observable . toList ( ) . toFuture ( ) } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code toFuture } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return a { @ link Future } that expects a single item to be emitted by this { @ code Observable }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX documentation : To < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Future < T > toFuture ( ) { } }

implementation: return subscribeWith ( new FutureObserver < T > ( ) ) ;


signature:
public class Observable { /** * Subscribes to the source and calls the given callbacks < strong > on the current thread < / strong > .
 * < img width = " 640 " height = " 393 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / blockingSubscribe . o . 1 . png " alt = " " >
 * If the { @ code Observable } emits an error , it is wrapped into an
 * { @ link io . reactivex . exceptions . OnErrorNotImplementedException OnErrorNotImplementedException }
 * and routed to the RxJavaPlugins . onError handler .
 * Using the overloads { @ link # blockingSubscribe ( Consumer , Consumer ) }
 * or { @ link # blockingSubscribe ( Consumer , Consumer , Action ) } instead is recommended .
 * Note that calling this method will block the caller thread until the upstream terminates
 * normally or with an error . Therefore , calling this method from special threads such as the
 * Android Main Thread or the Swing Event Dispatch Thread is not recommended .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSubscribe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param onNext the callback action for each source value
 * @ since 2.0
 * @ see # blockingSubscribe ( Consumer , Consumer )
 * @ see # blockingSubscribe ( Consumer , Consumer , Action ) */
@ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Consumer < ? super T > onNext ) { } }

implementation: ObservableBlockingSubscribe . subscribe ( this , onNext , Functions . ON_ERROR_MISSING , Functions . EMPTY_ACTION ) ;


signature:
public class Observable { /** * Subscribes to the source and calls the given callbacks < strong > on the current thread < / strong > .
 * < img width = " 640 " height = " 396 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / blockingSubscribe . o . 2 . png " alt = " " >
 * Note that calling this method will block the caller thread until the upstream terminates
 * normally or with an error . Therefore , calling this method from special threads such as the
 * Android Main Thread or the Swing Event Dispatch Thread is not recommended .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSubscribe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param onNext the callback action for each source value
 * @ param onError the callback action for an error event
 * @ since 2.0
 * @ see # blockingSubscribe ( Consumer , Consumer , Action ) */
@ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Consumer < ? super T > onNext , Consumer < ? super Throwable > onError ) { } }

implementation: ObservableBlockingSubscribe . subscribe ( this , onNext , onError , Functions . EMPTY_ACTION ) ;


signature:
public class Observable { /** * Subscribes to the source and calls the given callbacks < strong > on the current thread < / strong > .
 * < img width = " 640 " height = " 394 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / blockingSubscribe . o . png " alt = " " >
 * Note that calling this method will block the caller thread until the upstream terminates
 * normally or with an error . Therefore , calling this method from special threads such as the
 * Android Main Thread or the Swing Event Dispatch Thread is not recommended .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSubscribe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param onNext the callback action for each source value
 * @ param onError the callback action for an error event
 * @ param onComplete the callback action for the completion event .
 * @ since 2.0 */
@ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Consumer < ? super T > onNext , Consumer < ? super Throwable > onError , Action onComplete ) { } }

implementation: ObservableBlockingSubscribe . subscribe ( this , onNext , onError , onComplete ) ;


signature:
public class Observable { /** * Subscribes to the source and calls the { @ link Observer } methods < strong > on the current thread < / strong > .
 * Note that calling this method will block the caller thread until the upstream terminates
 * normally , with an error or the { @ code Observer } disposes the { @ link Disposable } it receives via
 * { @ link Observer # onSubscribe ( Disposable ) } .
 * Therefore , calling this method from special threads such as the
 * Android Main Thread or the Swing Event Dispatch Thread is not recommended .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSubscribe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * The a dispose ( ) call is composed through .
 * @ param observer the { @ code Observer } instance to forward events and calls to in the current thread
 * @ since 2.0 */
@ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Observer < ? super T > observer ) { } }

implementation: ObservableBlockingSubscribe . subscribe ( this , observer ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping buffers , each containing { @ code count } items . When the source
 * ObservableSource completes , the resulting ObservableSource emits the current buffer and propagates the notification
 * from the source ObservableSource . Note that if the source ObservableSource issues an onError notification
 * the event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer3 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param count
 * the maximum number of items in each buffer before it should be emitted
 * @ return an Observable that emits connected , non - overlapping buffers , each containing at most
 * { @ code count } items from the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < List < T > > buffer ( int count ) { } }

implementation: return buffer ( count , count ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits buffers every { @ code skip } items , each containing { @ code count } items . When the source
 * ObservableSource completes , the resulting ObservableSource emits the current buffer and propagates the notification
 * from the source ObservableSource . Note that if the source ObservableSource issues an onError notification
 * the event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer4 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param count
 * the maximum size of each buffer before it should be emitted
 * @ param skip
 * how many items emitted by the source ObservableSource should be skipped before starting a new
 * buffer . Note that when { @ code skip } and { @ code count } are equal , this is the same operation as
 * { @ link # buffer ( int ) } .
 * @ return an Observable that emits buffers for every { @ code skip } item from the source ObservableSource and
 * containing at most { @ code count } items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < List < T > > buffer ( int count , int skip ) { } }

implementation: return buffer ( count , skip , ArrayListSupplier . < T > asCallable ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits buffers every { @ code skip } items , each containing { @ code count } items . When the source
 * ObservableSource completes , the resulting ObservableSource emits the current buffer and propagates the notification
 * from the source ObservableSource . Note that if the source ObservableSource issues an onError notification
 * the event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer4 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the collection subclass type to buffer into
 * @ param count
 * the maximum size of each buffer before it should be emitted
 * @ param skip
 * how many items emitted by the source ObservableSource should be skipped before starting a new
 * buffer . Note that when { @ code skip } and { @ code count } are equal , this is the same operation as
 * { @ link # buffer ( int ) } .
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ return an Observable that emits buffers for every { @ code skip } item from the source ObservableSource and
 * containing at most { @ code count } items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U extends Collection < ? super T > > Observable < U > buffer ( int count , int skip , Callable < U > bufferSupplier ) { } }

implementation: ObjectHelper . verifyPositive ( count , "count" ) ; ObjectHelper . verifyPositive ( skip , "skip" ) ; ObjectHelper . requireNonNull ( bufferSupplier , "bufferSupplier is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableBuffer < T , U > ( this , count , skip , bufferSupplier ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping buffers , each containing { @ code count } items . When the source
 * ObservableSource completes , the resulting ObservableSource emits the current buffer and propagates the notification
 * from the source ObservableSource . Note that if the source ObservableSource issues an onError notification
 * the event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer3 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the collection subclass type to buffer into
 * @ param count
 * the maximum number of items in each buffer before it should be emitted
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ return an Observable that emits connected , non - overlapping buffers , each containing at most
 * { @ code count } items from the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U extends Collection < ? super T > > Observable < U > buffer ( int count , Callable < U > bufferSupplier ) { } }

implementation: return buffer ( count , count , bufferSupplier ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource starts a new buffer periodically , as determined by the { @ code timeskip } argument . It emits
 * each buffer after a fixed timespan , specified by the { @ code timespan } argument . When the source
 * ObservableSource completes , the resulting ObservableSource emits the current buffer and propagates the notification
 * from the source ObservableSource . Note that if the source ObservableSource issues an onError notification
 * the event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer7 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each buffer collects items before it is emitted
 * @ param timeskip
 * the period of time after which a new buffer will be created
 * @ param unit
 * the unit of time that applies to the { @ code timespan } and { @ code timeskip } arguments
 * @ return an Observable that emits new buffers of items emitted by the source ObservableSource periodically after
 * a fixed timespan has elapsed
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < List < T > > buffer ( long timespan , long timeskip , TimeUnit unit ) { } }

implementation: return buffer ( timespan , timeskip , unit , Schedulers . computation ( ) , ArrayListSupplier . < T > asCallable ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource starts a new buffer periodically , as determined by the { @ code timeskip } argument , and on the
 * specified { @ code scheduler } . It emits each buffer after a fixed timespan , specified by the
 * { @ code timespan } argument . When the source ObservableSource completes , the resulting ObservableSource emits the
 * current buffer and propagates the notification from the source ObservableSource . Note that if the source
 * ObservableSource issues an onError notification the event is passed on immediately without first emitting the
 * buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer7 . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param < U > the collection subclass type to buffer into
 * @ param timespan
 * the period of time each buffer collects items before it is emitted
 * @ param timeskip
 * the period of time after which a new buffer will be created
 * @ param unit
 * the unit of time that applies to the { @ code timespan } and { @ code timeskip } arguments
 * @ param scheduler
 * the { @ link Scheduler } to use when determining the end and start of a buffer
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ return an Observable that emits new buffers of items emitted by the source ObservableSource periodically after
 * a fixed timespan has elapsed
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < U extends Collection < ? super T > > Observable < U > buffer ( long timespan , long timeskip , TimeUnit unit , Scheduler scheduler , Callable < U > bufferSupplier ) { } }

implementation: ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( bufferSupplier , "bufferSupplier is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableBufferTimed < T , U > ( this , timespan , timeskip , unit , scheduler , bufferSupplier , Integer . MAX_VALUE , false ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping buffers , each of a fixed duration specified by the
 * { @ code timespan } argument or a maximum size specified by the { @ code count } argument ( whichever is reached
 * first ) . When the source ObservableSource completes , the resulting ObservableSource emits the current buffer and
 * propagates the notification from the source ObservableSource . Note that if the source ObservableSource issues an
 * onError notification the event is passed on immediately without first emitting the buffer it is in the process of
 * assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer6 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each buffer collects items before it is emitted and replaced with a new
 * buffer
 * @ param unit
 * the unit of time which applies to the { @ code timespan } argument
 * @ param count
 * the maximum size of each buffer before it is emitted
 * @ return an Observable that emits connected , non - overlapping buffers of items emitted by the source
 * ObservableSource , after a fixed duration or when the buffer reaches maximum capacity ( whichever occurs
 * first )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < List < T > > buffer ( long timespan , TimeUnit unit , int count ) { } }

implementation: return buffer ( timespan , unit , Schedulers . computation ( ) , count ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping buffers , each of a fixed duration specified by the
 * { @ code timespan } argument as measured on the specified { @ code scheduler } , or a maximum size specified by
 * the { @ code count } argument ( whichever is reached first ) . When the source ObservableSource completes , the resulting
 * ObservableSource emits the current buffer and propagates the notification from the source ObservableSource . Note
 * that if the source ObservableSource issues an onError notification the event is passed on immediately without
 * first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer6 . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each buffer collects items before it is emitted and replaced with a new
 * buffer
 * @ param unit
 * the unit of time which applies to the { @ code timespan } argument
 * @ param scheduler
 * the { @ link Scheduler } to use when determining the end and start of a buffer
 * @ param count
 * the maximum size of each buffer before it is emitted
 * @ return an Observable that emits connected , non - overlapping buffers of items emitted by the source
 * ObservableSource after a fixed duration or when the buffer reaches maximum capacity ( whichever occurs
 * first )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < List < T > > buffer ( long timespan , TimeUnit unit , Scheduler scheduler , int count ) { } }

implementation: return buffer ( timespan , unit , scheduler , count , ArrayListSupplier . < T > asCallable ( ) , false ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping buffers , each of a fixed duration specified by the
 * { @ code timespan } argument as measured on the specified { @ code scheduler } , or a maximum size specified by
 * the { @ code count } argument ( whichever is reached first ) . When the source ObservableSource completes , the resulting
 * ObservableSource emits the current buffer and propagates the notification from the source ObservableSource . Note
 * that if the source ObservableSource issues an onError notification the event is passed on immediately without
 * first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer6 . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param < U > the collection subclass type to buffer into
 * @ param timespan
 * the period of time each buffer collects items before it is emitted and replaced with a new
 * buffer
 * @ param unit
 * the unit of time which applies to the { @ code timespan } argument
 * @ param scheduler
 * the { @ link Scheduler } to use when determining the end and start of a buffer
 * @ param count
 * the maximum size of each buffer before it is emitted
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ param restartTimerOnMaxSize if true the time window is restarted when the max capacity of the current buffer
 * is reached
 * @ return an Observable that emits connected , non - overlapping buffers of items emitted by the source
 * ObservableSource after a fixed duration or when the buffer reaches maximum capacity ( whichever occurs
 * first )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < U extends Collection < ? super T > > Observable < U > buffer ( long timespan , TimeUnit unit , Scheduler scheduler , int count , Callable < U > bufferSupplier , boolean restartTimerOnMaxSize ) { } }

implementation: ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( bufferSupplier , "bufferSupplier is null" ) ; ObjectHelper . verifyPositive ( count , "count" ) ; return RxJavaPlugins . onAssembly ( new ObservableBufferTimed < T , U > ( this , timespan , timespan , unit , scheduler , bufferSupplier , count , restartTimerOnMaxSize ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits buffers that it creates when the specified { @ code openingIndicator } ObservableSource emits an
 * item , and closes when the ObservableSource returned from { @ code closingIndicator } emits an item . If any of the
 * source ObservableSource , { @ code openingIndicator } or { @ code closingIndicator } issues an onError notification the
 * event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 470 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer2 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < TOpening > the element type of the buffer - opening ObservableSource
 * @ param < TClosing > the element type of the individual buffer - closing ObservableSources
 * @ param openingIndicator
 * the ObservableSource that , when it emits an item , causes a new buffer to be created
 * @ param closingIndicator
 * the { @ link Function } that is used to produce an ObservableSource for every buffer created . When this
 * ObservableSource emits an item , the associated buffer is emitted .
 * @ return an Observable that emits buffers , containing items from the source ObservableSource , that are created
 * and closed when the specified ObservableSources emit items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < TOpening , TClosing > Observable < List < T > > buffer ( ObservableSource < ? extends TOpening > openingIndicator , Function < ? super TOpening , ? extends ObservableSource < ? extends TClosing > > closingIndicator ) { } }

implementation: return buffer ( openingIndicator , closingIndicator , ArrayListSupplier . < T > asCallable ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits buffers that it creates when the specified { @ code openingIndicator } ObservableSource emits an
 * item , and closes when the ObservableSource returned from { @ code closingIndicator } emits an item . If any of the
 * source ObservableSource , { @ code openingIndicator } or { @ code closingIndicator } issues an onError notification the
 * event is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < img width = " 640 " height = " 470 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer2 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the collection subclass type to buffer into
 * @ param < TOpening > the element type of the buffer - opening ObservableSource
 * @ param < TClosing > the element type of the individual buffer - closing ObservableSources
 * @ param openingIndicator
 * the ObservableSource that , when it emits an item , causes a new buffer to be created
 * @ param closingIndicator
 * the { @ link Function } that is used to produce an ObservableSource for every buffer created . When this
 * ObservableSource emits an item , the associated buffer is emitted .
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ return an Observable that emits buffers , containing items from the source ObservableSource , that are created
 * and closed when the specified ObservableSources emit items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < TOpening , TClosing , U extends Collection < ? super T > > Observable < U > buffer ( ObservableSource < ? extends TOpening > openingIndicator , Function < ? super TOpening , ? extends ObservableSource < ? extends TClosing > > closingIndicator , Callable < U > bufferSupplier ) { } }

implementation: ObjectHelper . requireNonNull ( openingIndicator , "openingIndicator is null" ) ; ObjectHelper . requireNonNull ( closingIndicator , "closingIndicator is null" ) ; ObjectHelper . requireNonNull ( bufferSupplier , "bufferSupplier is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableBufferBoundary < T , U , TOpening , TClosing > ( this , openingIndicator , closingIndicator , bufferSupplier ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits non - overlapping buffered items from the source ObservableSource each time the
 * specified boundary ObservableSource emits an item .
 * < img width = " 640 " height = " 395 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer8 . png " alt = " " >
 * Completion of either the source or the boundary ObservableSource causes the returned ObservableSource to emit the
 * latest buffer and complete . If either the source ObservableSource or the boundary ObservableSource issues an
 * onError notification the event is passed on immediately without first emitting the buffer it is in the process of
 * assembling .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < B >
 * the boundary value type ( ignored )
 * @ param boundary
 * the boundary ObservableSource
 * @ return an Observable that emits buffered items from the source ObservableSource when the boundary ObservableSource
 * emits an item
 * @ see # buffer ( ObservableSource , int )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Observable < List < T > > buffer ( ObservableSource < B > boundary ) { } }

implementation: return buffer ( boundary , ArrayListSupplier . < T > asCallable ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits non - overlapping buffered items from the source ObservableSource each time the
 * specified boundary ObservableSource emits an item .
 * < img width = " 640 " height = " 395 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer8 . png " alt = " " >
 * Completion of either the source or the boundary ObservableSource causes the returned ObservableSource to emit the
 * latest buffer and complete . If either the source ObservableSource or the boundary ObservableSource issues an
 * onError notification the event is passed on immediately without first emitting the buffer it is in the process of
 * assembling .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < B >
 * the boundary value type ( ignored )
 * @ param boundary
 * the boundary ObservableSource
 * @ param initialCapacity
 * the initial capacity of each buffer chunk
 * @ return an Observable that emits buffered items from the source ObservableSource when the boundary ObservableSource
 * emits an item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a >
 * @ see # buffer ( ObservableSource ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Observable < List < T > > buffer ( ObservableSource < B > boundary , final int initialCapacity ) { } }

implementation: ObjectHelper . verifyPositive ( initialCapacity , "initialCapacity" ) ; return buffer ( boundary , Functions . < T > createArrayList ( initialCapacity ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits non - overlapping buffered items from the source ObservableSource each time the
 * specified boundary ObservableSource emits an item .
 * < img width = " 640 " height = " 395 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer8 . png " alt = " " >
 * Completion of either the source or the boundary ObservableSource causes the returned ObservableSource to emit the
 * latest buffer and complete . If either the source ObservableSource or the boundary ObservableSource issues an
 * onError notification the event is passed on immediately without first emitting the buffer it is in the process of
 * assembling .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the collection subclass type to buffer into
 * @ param < B >
 * the boundary value type ( ignored )
 * @ param boundary
 * the boundary ObservableSource
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ return an Observable that emits buffered items from the source ObservableSource when the boundary ObservableSource
 * emits an item
 * @ see # buffer ( ObservableSource , int )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B , U extends Collection < ? super T > > Observable < U > buffer ( ObservableSource < B > boundary , Callable < U > bufferSupplier ) { } }

implementation: ObjectHelper . requireNonNull ( boundary , "boundary is null" ) ; ObjectHelper . requireNonNull ( bufferSupplier , "bufferSupplier is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableBufferExactBoundary < T , U , B > ( this , boundary , bufferSupplier ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits buffers of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping buffers . It emits the current buffer and replaces it with a
 * new buffer whenever the ObservableSource produced by the specified { @ code boundarySupplier } emits an item .
 * < img width = " 640 " height = " 395 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / buffer1 . png " alt = " " >
 * If either the source { @ code ObservableSource } or the boundary { @ code ObservableSource } issues an { @ code onError } notification the event
 * is passed on immediately without first emitting the buffer it is in the process of assembling .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code buffer } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < B > the value type of the boundary - providing ObservableSource
 * @ param boundarySupplier
 * a { @ link Callable } that produces an ObservableSource that governs the boundary between buffers .
 * Whenever the supplied { @ code ObservableSource } emits an item , { @ code buffer } emits the current buffer and
 * begins to fill a new one
 * @ return an Observable that emits a connected , non - overlapping buffer of items from the source ObservableSource
 * each time the ObservableSource created with the { @ code closingIndicator } argument emits an item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Observable < List < T > > buffer ( Callable < ? extends ObservableSource < B > > boundarySupplier ) { } }

implementation: return buffer ( boundarySupplier , ArrayListSupplier . < T > asCallable ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that subscribes to this ObservableSource lazily , caches all of its events
 * and replays them , in the same order as received , to all the downstream subscribers .
 * < img width = " 640 " height = " 410 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / cacheWithInitialCapacity . o . png " alt = " " >
 * This is useful when you want an ObservableSource to cache responses and you can ' t control the
 * subscribe / dispose behavior of all the { @ link Observer } s .
 * The operator subscribes only when the first downstream subscriber subscribes and maintains
 * a single subscription towards this ObservableSource . In contrast , the operator family of { @ link # replay ( ) }
 * that return a { @ link ConnectableObservable } require an explicit call to { @ link ConnectableObservable # connect ( ) } .
 * < em > Note : < / em > You sacrifice the ability to dispose the origin when you use the { @ code cache }
 * Observer so be careful not to use this Observer on ObservableSources that emit an infinite or very large number
 * of items that will use up memory .
 * A possible workaround is to apply ` takeUntil ` with a predicate or
 * another source before ( and perhaps after ) the application of cache ( ) .
 * < pre > < code >
 * AtomicBoolean shouldStop = new AtomicBoolean ( ) ;
 * source . takeUntil ( v - & gt ; shouldStop . get ( ) )
 * . cache ( )
 * . takeUntil ( v - & gt ; shouldStop . get ( ) )
 * . subscribe ( . . . ) ;
 * < / code > < / pre >
 * Since the operator doesn ' t allow clearing the cached values either , the possible workaround is
 * to forget all references to it via { @ link # onTerminateDetach ( ) } applied along with the previous
 * workaround :
 * < pre > < code >
 * AtomicBoolean shouldStop = new AtomicBoolean ( ) ;
 * source . takeUntil ( v - & gt ; shouldStop . get ( ) )
 * . onTerminateDetach ( )
 * . cache ( )
 * . takeUntil ( v - & gt ; shouldStop . get ( ) )
 * . onTerminateDetach ( )
 * . subscribe ( . . . ) ;
 * < / code > < / pre >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code cacheWithInitialCapacity } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < em > Note : < / em > The capacity hint is not an upper bound on cache size . For that , consider
 * { @ link # replay ( int ) } in combination with { @ link ConnectableObservable # autoConnect ( ) } or similar .
 * @ param initialCapacity hint for number of items to cache ( for optimizing underlying data structure )
 * @ return an Observable that , when first subscribed to , caches all of its items and notifications for the
 * benefit of subsequent subscribers
 * @ see < a href = " http : / / reactivex . io / documentation / operators / replay . html " > ReactiveX operators documentation : Replay < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > cacheWithInitialCapacity ( int initialCapacity ) { } }

implementation: ObjectHelper . verifyPositive ( initialCapacity , "initialCapacity" ) ; return RxJavaPlugins . onAssembly ( new ObservableCache < T > ( this , initialCapacity ) ) ;


signature:
public class Observable { /** * Collects items emitted by the finite source ObservableSource into a single mutable data structure and returns
 * a Single that emits this structure .
 * < img width = " 640 " height = " 330 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / collect . 2 . png " alt = " " >
 * This is a simplified version of { @ code reduce } that does not need to return the state on each pass .
 * Note that this operator requires the upstream to signal { @ code onComplete } for the accumulator object to
 * be emitted . Sources that are infinite and never complete will never emit anything through this
 * operator and an infinite source may lead to a fatal { @ code OutOfMemoryError } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code collect } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the accumulator and output type
 * @ param initialValueSupplier
 * the mutable data structure that will collect the items
 * @ param collector
 * a function that accepts the { @ code state } and an emitted item , and modifies { @ code state }
 * accordingly
 * @ return a Single that emits the result of collecting the values emitted by the source ObservableSource
 * into a single mutable data structure
 * @ see < a href = " http : / / reactivex . io / documentation / operators / reduce . html " > ReactiveX operators documentation : Reduce < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Single < U > collect ( Callable < ? extends U > initialValueSupplier , BiConsumer < ? super U , ? super T > collector ) { } }

implementation: ObjectHelper . requireNonNull ( initialValueSupplier , "initialValueSupplier is null" ) ; ObjectHelper . requireNonNull ( collector , "collector is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableCollectSingle < T , U > ( this , initialValueSupplier , collector ) ) ;


signature:
public class Observable { /** * Collects items emitted by the finite source ObservableSource into a single mutable data structure and returns
 * a Single that emits this structure .
 * < img width = " 640 " height = " 330 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / collectInto . o . png " alt = " " >
 * This is a simplified version of { @ code reduce } that does not need to return the state on each pass .
 * Note that this operator requires the upstream to signal { @ code onComplete } for the accumulator object to
 * be emitted . Sources that are infinite and never complete will never emit anything through this
 * operator and an infinite source may lead to a fatal { @ code OutOfMemoryError } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code collectInto } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the accumulator and output type
 * @ param initialValue
 * the mutable data structure that will collect the items
 * @ param collector
 * a function that accepts the { @ code state } and an emitted item , and modifies { @ code state }
 * accordingly
 * @ return a Single that emits the result of collecting the values emitted by the source ObservableSource
 * into a single mutable data structure
 * @ see < a href = " http : / / reactivex . io / documentation / operators / reduce . html " > ReactiveX operators documentation : Reduce < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Single < U > collectInto ( final U initialValue , BiConsumer < ? super U , ? super T > collector ) { } }

implementation: ObjectHelper . requireNonNull ( initialValue , "initialValue is null" ) ; return collect ( Functions . justCallable ( initialValue ) , collector ) ;


signature:
public class Observable { /** * Transform an ObservableSource by applying a particular Transformer function to it .
 * This method operates on the ObservableSource itself whereas { @ link # lift } operates on the ObservableSource ' s
 * Observers .
 * If the operator you are creating is designed to act on the individual items emitted by a source
 * ObservableSource , use { @ link # lift } . If your operator is designed to transform the source ObservableSource as a whole
 * ( for instance , by applying a particular set of existing RxJava operators to it ) use { @ code compose } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code compose } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the value type of the output ObservableSource
 * @ param composer implements the function that transforms the source ObservableSource
 * @ return the source ObservableSource , transformed by the transformer function
 * @ see < a href = " https : / / github . com / ReactiveX / RxJava / wiki / Implementing - Your - Own - Operators " > RxJava wiki : Implementing Your Own Operators < / a > */
@ SuppressWarnings ( "unchecked" ) @ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > compose ( ObservableTransformer < ? super T , ? extends R > composer ) { } }

implementation: return wrap ( ( ( ObservableTransformer < T , R > ) ObjectHelper . requireNonNull ( composer , "composer is null" ) ) . apply ( this ) ) ;


signature:
public class Observable { /** * Returns a new Observable that emits items resulting from applying a function that you supply to each item
 * emitted by the source ObservableSource , where that function returns an ObservableSource , and then emitting the items
 * that result from concatenating those resulting ObservableSources .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMap } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the type of the inner ObservableSource sources and thus the output type
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns an
 * ObservableSource
 * @ return an Observable that emits the result of applying the transformation function to each item emitted
 * by the source ObservableSource and concatenating the ObservableSources obtained from this transformation
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMap ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper ) { } }

implementation: return concatMap ( mapper , 2 ) ;


signature:
public class Observable { /** * Returns a new Observable that emits items resulting from applying a function that you supply to each item
 * emitted by the source ObservableSource , where that function returns an ObservableSource , and then emitting the items
 * that result from concatenating those resulting ObservableSources .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMap } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the type of the inner ObservableSource sources and thus the output type
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns an
 * ObservableSource
 * @ param prefetch
 * the number of elements to prefetch from the current Observable
 * @ return an Observable that emits the result of applying the transformation function to each item emitted
 * by the source ObservableSource and concatenating the ObservableSources obtained from this transformation
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMap ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; if ( this instanceof ScalarCallable ) { @ SuppressWarnings ( "unchecked" ) T v = ( ( ScalarCallable < T > ) this ) . call ( ) ; if ( v == null ) { return empty ( ) ; } return ObservableScalarXMap . scalarXMap ( v , mapper ) ; } return RxJavaPlugins . onAssembly ( new ObservableConcatMap < T , R > ( this , mapper , prefetch , ErrorMode . IMMEDIATE ) ) ;


signature:
public class Observable { /** * Maps each of the items into an ObservableSource , subscribes to them one after the other ,
 * one at a time and emits their values in order
 * while delaying any error from either this or any of the inner ObservableSources
 * till all of them terminate .
 * < img width = " 640 " height = " 347 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapDelayError . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the result value type
 * @ param mapper the function that maps the items of this ObservableSource into the inner ObservableSources .
 * @ return the new ObservableSource instance with the concatenation behavior */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapDelayError ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper ) { } }

implementation: return concatMapDelayError ( mapper , bufferSize ( ) , true ) ;


signature:
public class Observable { /** * Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single
 * ObservableSource .
 * Eager concatenation means that once a subscriber subscribes , this operator subscribes to all of the
 * source ObservableSources . The operator buffers the values emitted by these ObservableSources and then drains them in
 * order , each one after the previous one completes .
 * < img width = " 640 " height = " 360 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapEager . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This method does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the value type
 * @ param mapper the function that maps a sequence of values into a sequence of ObservableSources that will be
 * eagerly concatenated
 * @ return the new ObservableSource instance with the specified concatenation behavior
 * @ since 2.0 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapEager ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper ) { } }

implementation: return concatMapEager ( mapper , Integer . MAX_VALUE , bufferSize ( ) ) ;


signature:
public class Observable { /** * Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single
 * ObservableSource .
 * Eager concatenation means that once a subscriber subscribes , this operator subscribes to all of the
 * source ObservableSources . The operator buffers the values emitted by these ObservableSources and then drains them in
 * order , each one after the previous one completes .
 * < img width = " 640 " height = " 360 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapEager . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This method does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the value type
 * @ param mapper the function that maps a sequence of values into a sequence of ObservableSources that will be
 * eagerly concatenated
 * @ param maxConcurrency the maximum number of concurrent subscribed ObservableSources
 * @ param prefetch hints about the number of expected values from each inner ObservableSource , must be positive
 * @ return the new ObservableSource instance with the specified concatenation behavior
 * @ since 2.0 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapEager ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper , int maxConcurrency , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( maxConcurrency , "maxConcurrency" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapEager < T , R > ( this , mapper , ErrorMode . IMMEDIATE , maxConcurrency , prefetch ) ) ;


signature:
public class Observable { /** * Maps a sequence of values into ObservableSources and concatenates these ObservableSources eagerly into a single
 * ObservableSource .
 * Eager concatenation means that once a subscriber subscribes , this operator subscribes to all of the
 * source ObservableSources . The operator buffers the values emitted by these ObservableSources and then drains them in
 * order , each one after the previous one completes .
 * < img width = " 640 " height = " 390 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapEagerDelayError . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This method does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the value type
 * @ param mapper the function that maps a sequence of values into a sequence of ObservableSources that will be
 * eagerly concatenated
 * @ param maxConcurrency the maximum number of concurrent subscribed ObservableSources
 * @ param prefetch
 * the number of elements to prefetch from each source ObservableSource
 * @ param tillTheEnd
 * if true , exceptions from the current Observable and all the inner ObservableSources are delayed until
 * all of them terminate , if false , exception from the current Observable is delayed until the
 * currently running ObservableSource terminates
 * @ return the new ObservableSource instance with the specified concatenation behavior
 * @ since 2.0 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapEagerDelayError ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper , int maxConcurrency , int prefetch , boolean tillTheEnd ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( maxConcurrency , "maxConcurrency" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapEager < T , R > ( this , mapper , tillTheEnd ? ErrorMode . END : ErrorMode . BOUNDARY , maxConcurrency , prefetch ) ) ;


signature:
public class Observable { /** * Maps each element of the upstream Observable into CompletableSources , subscribes to them one at a time in
 * order and waits until the upstream and all CompletableSources complete .
 * < img width = " 640 " height = " 505 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapCompletable . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapCompletable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.6 - experimental
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns a CompletableSource
 * @ return a Completable that signals { @ code onComplete } when the upstream and all CompletableSources complete
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Completable concatMapCompletable ( Function < ? super T , ? extends CompletableSource > mapper ) { } }

implementation: return concatMapCompletable ( mapper , 2 ) ;


signature:
public class Observable { /** * Maps each element of the upstream Observable into CompletableSources , subscribes to them one at a time in
 * order and waits until the upstream and all CompletableSources complete .
 * < img width = " 640 " height = " 505 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapCompletable . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapCompletable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.6 - experimental
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns a CompletableSource
 * @ param capacityHint
 * the number of upstream items expected to be buffered until the current CompletableSource , mapped from
 * the current item , completes .
 * @ return a Completable that signals { @ code onComplete } when the upstream and all CompletableSources complete
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Completable concatMapCompletable ( Function < ? super T , ? extends CompletableSource > mapper , int capacityHint ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( capacityHint , "capacityHint" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapCompletable < T > ( this , mapper , ErrorMode . IMMEDIATE , capacityHint ) ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link CompletableSource } s and subscribes to them one after the
 * other terminates , delaying all errors till both this { @ code Observable } and all
 * inner { @ code CompletableSource } s terminate .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapCompletableDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param mapper the function called with the upstream item and should return
 * a { @ code CompletableSource } to become the next source to
 * be subscribed to
 * @ return a new Completable instance
 * @ see # concatMapCompletable ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Completable concatMapCompletableDelayError ( Function < ? super T , ? extends CompletableSource > mapper ) { } }

implementation: return concatMapCompletableDelayError ( mapper , true , 2 ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link CompletableSource } s and subscribes to them one after the
 * other terminates , optionally delaying all errors till both this { @ code Observable } and all
 * inner { @ code CompletableSource } s terminate .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapCompletableDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param mapper the function called with the upstream item and should return
 * a { @ code CompletableSource } to become the next source to
 * be subscribed to
 * @ param tillTheEnd If { @ code true } , errors from this { @ code Observable } or any of the
 * inner { @ code CompletableSource } s are delayed until all
 * of them terminate . If { @ code false } , an error from this
 * { @ code Observable } is delayed until the current inner
 * { @ code CompletableSource } terminates and only then is
 * it emitted to the downstream .
 * @ param prefetch The number of upstream items to prefetch so that fresh items are
 * ready to be mapped when a previous { @ code CompletableSource } terminates .
 * The operator replenishes after half of the prefetch amount has been consumed
 * and turned into { @ code CompletableSource } s .
 * @ return a new Completable instance
 * @ see # concatMapCompletable ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Completable concatMapCompletableDelayError ( Function < ? super T , ? extends CompletableSource > mapper , boolean tillTheEnd , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapCompletable < T > ( this , mapper , tillTheEnd ? ErrorMode . END : ErrorMode . BOUNDARY , prefetch ) ) ;


signature:
public class Observable { /** * Returns an Observable that concatenate each item emitted by the source ObservableSource with the values in an
 * Iterable corresponding to that item that is generated by a selector .
 * < img width = " 640 " height = " 275 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapIterable . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapIterable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U >
 * the type of item emitted by the resulting ObservableSource
 * @ param mapper
 * a function that returns an Iterable sequence of values for when given an item emitted by the
 * source ObservableSource
 * @ return an Observable that emits the results of concatenating the items emitted by the source ObservableSource with
 * the values in the Iterables corresponding to those items , as generated by { @ code collectionSelector }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Observable < U > concatMapIterable ( final Function < ? super T , ? extends Iterable < ? extends U > > mapper ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableFlattenIterable < T , U > ( this , mapper ) ) ;


signature:
public class Observable { /** * Returns an Observable that concatenate each item emitted by the source ObservableSource with the values in an
 * Iterable corresponding to that item that is generated by a selector .
 * < img width = " 640 " height = " 275 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMapIterable . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapIterable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U >
 * the type of item emitted by the resulting ObservableSource
 * @ param mapper
 * a function that returns an Iterable sequence of values for when given an item emitted by the
 * source ObservableSource
 * @ param prefetch
 * the number of elements to prefetch from the current Observable
 * @ return an Observable that emits the results of concatenating the items emitted by the source ObservableSource with
 * the values in the Iterables corresponding to those items , as generated by { @ code collectionSelector }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Observable < U > concatMapIterable ( final Function < ? super T , ? extends Iterable < ? extends U > > mapper , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return concatMap ( ObservableInternalHelper . flatMapIntoIterable ( mapper ) , prefetch ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link MaybeSource } s and subscribes to them one after the
 * other succeeds or completes , emits their success value if available or terminates immediately if
 * either this { @ code Observable } or the current inner { @ code MaybeSource } fail .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapMaybe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code MaybeSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code MaybeSource } to become the next source to
 * be subscribed to
 * @ return a new Observable instance
 * @ see # concatMapMaybeDelayError ( Function )
 * @ see # concatMapMaybe ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapMaybe ( Function < ? super T , ? extends MaybeSource < ? extends R > > mapper ) { } }

implementation: return concatMapMaybe ( mapper , 2 ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link MaybeSource } s and subscribes to them one after the
 * other succeeds or completes , emits their success value if available or terminates immediately if
 * either this { @ code Observable } or the current inner { @ code MaybeSource } fail .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapMaybe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code MaybeSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code MaybeSource } to become the next source to
 * be subscribed to
 * @ param prefetch The number of upstream items to prefetch so that fresh items are
 * ready to be mapped when a previous { @ code MaybeSource } terminates .
 * The operator replenishes after half of the prefetch amount has been consumed
 * and turned into { @ code MaybeSource } s .
 * @ return a new Observable instance
 * @ see # concatMapMaybe ( Function )
 * @ see # concatMapMaybeDelayError ( Function , boolean , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapMaybe ( Function < ? super T , ? extends MaybeSource < ? extends R > > mapper , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapMaybe < T , R > ( this , mapper , ErrorMode . IMMEDIATE , prefetch ) ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link MaybeSource } s and subscribes to them one after the
 * other terminates , emits their success value if available and delaying all errors
 * till both this { @ code Observable } and all inner { @ code MaybeSource } s terminate .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapMaybeDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code MaybeSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code MaybeSource } to become the next source to
 * be subscribed to
 * @ return a new Observable instance
 * @ see # concatMapMaybe ( Function )
 * @ see # concatMapMaybeDelayError ( Function , boolean )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapMaybeDelayError ( Function < ? super T , ? extends MaybeSource < ? extends R > > mapper ) { } }

implementation: return concatMapMaybeDelayError ( mapper , true , 2 ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link MaybeSource } s and subscribes to them one after the
 * other terminates , emits their success value if available and optionally delaying all errors
 * till both this { @ code Observable } and all inner { @ code MaybeSource } s terminate .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapMaybeDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code MaybeSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code MaybeSource } to become the next source to
 * be subscribed to
 * @ param tillTheEnd If { @ code true } , errors from this { @ code Observable } or any of the
 * inner { @ code MaybeSource } s are delayed until all
 * of them terminate . If { @ code false } , an error from this
 * { @ code Observable } is delayed until the current inner
 * { @ code MaybeSource } terminates and only then is
 * it emitted to the downstream .
 * @ param prefetch The number of upstream items to prefetch so that fresh items are
 * ready to be mapped when a previous { @ code MaybeSource } terminates .
 * The operator replenishes after half of the prefetch amount has been consumed
 * and turned into { @ code MaybeSource } s .
 * @ return a new Observable instance
 * @ see # concatMapMaybe ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapMaybeDelayError ( Function < ? super T , ? extends MaybeSource < ? extends R > > mapper , boolean tillTheEnd , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapMaybe < T , R > ( this , mapper , tillTheEnd ? ErrorMode . END : ErrorMode . BOUNDARY , prefetch ) ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link SingleSource } s and subscribes to them one after the
 * other succeeds , emits their success values or terminates immediately if
 * either this { @ code Observable } or the current inner { @ code SingleSource } fail .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapSingle } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code SingleSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code SingleSource } to become the next source to
 * be subscribed to
 * @ return a new Observable instance
 * @ see # concatMapSingleDelayError ( Function )
 * @ see # concatMapSingle ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapSingle ( Function < ? super T , ? extends SingleSource < ? extends R > > mapper ) { } }

implementation: return concatMapSingle ( mapper , 2 ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link SingleSource } s and subscribes to them one after the
 * other succeeds , emits their success values or terminates immediately if
 * either this { @ code Observable } or the current inner { @ code SingleSource } fail .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapSingle } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code SingleSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code SingleSource } to become the next source to
 * be subscribed to
 * @ param prefetch The number of upstream items to prefetch so that fresh items are
 * ready to be mapped when a previous { @ code SingleSource } terminates .
 * The operator replenishes after half of the prefetch amount has been consumed
 * and turned into { @ code SingleSource } s .
 * @ return a new Observable instance
 * @ see # concatMapSingle ( Function )
 * @ see # concatMapSingleDelayError ( Function , boolean , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapSingle ( Function < ? super T , ? extends SingleSource < ? extends R > > mapper , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapSingle < T , R > ( this , mapper , ErrorMode . IMMEDIATE , prefetch ) ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link SingleSource } s and subscribes to them one after the
 * other succeeds or fails , emits their success values and optionally delays all errors
 * till both this { @ code Observable } and all inner { @ code SingleSource } s terminate .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapSingleDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code SingleSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code SingleSource } to become the next source to
 * be subscribed to
 * @ param tillTheEnd If { @ code true } , errors from this { @ code Observable } or any of the
 * inner { @ code SingleSource } s are delayed until all
 * of them terminate . If { @ code false } , an error from this
 * { @ code Observable } is delayed until the current inner
 * { @ code SingleSource } terminates and only then is
 * it emitted to the downstream .
 * @ return a new Observable instance
 * @ see # concatMapSingle ( Function , int )
 * @ see # concatMapSingleDelayError ( Function , boolean , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapSingleDelayError ( Function < ? super T , ? extends SingleSource < ? extends R > > mapper , boolean tillTheEnd ) { } }

implementation: return concatMapSingleDelayError ( mapper , tillTheEnd , 2 ) ;


signature:
public class Observable { /** * Maps the upstream items into { @ link SingleSource } s and subscribes to them one after the
 * other succeeds or fails , emits their success values and optionally delays errors
 * till both this { @ code Observable } and all inner { @ code SingleSource } s terminate .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapSingleDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the result type of the inner { @ code SingleSource } s
 * @ param mapper the function called with the upstream item and should return
 * a { @ code SingleSource } to become the next source to
 * be subscribed to
 * @ param tillTheEnd If { @ code true } , errors from this { @ code Observable } or any of the
 * inner { @ code SingleSource } s are delayed until all
 * of them terminate . If { @ code false } , an error from this
 * { @ code Observable } is delayed until the current inner
 * { @ code SingleSource } terminates and only then is
 * it emitted to the downstream .
 * @ param prefetch The number of upstream items to prefetch so that fresh items are
 * ready to be mapped when a previous { @ code SingleSource } terminates .
 * The operator replenishes after half of the prefetch amount has been consumed
 * and turned into { @ code SingleSource } s .
 * @ return a new Observable instance
 * @ see # concatMapSingle ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > concatMapSingleDelayError ( Function < ? super T , ? extends SingleSource < ? extends R > > mapper , boolean tillTheEnd , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatMapSingle < T , R > ( this , mapper , tillTheEnd ? ErrorMode . END : ErrorMode . BOUNDARY , prefetch ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits the items emitted from the current ObservableSource , then the next , one after
 * the other , without interleaving them .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concat . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatWith } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param other
 * an ObservableSource to be concatenated after the current
 * @ return an Observable that emits items emitted by the two source ObservableSources , one after the other ,
 * without interleaving them
 * @ see < a href = " http : / / reactivex . io / documentation / operators / concat . html " > ReactiveX operators documentation : Concat < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > concatWith ( ObservableSource < ? extends T > other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return concat ( this , other ) ;


signature:
public class Observable { /** * Returns an { @ code Observable } that emits the items from this { @ code Observable } followed by the success item or error event
 * of the other { @ link SingleSource } .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concat . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatWith } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.10 - experimental
 * @ param other the SingleSource whose signal should be emitted after this { @ code Observable } completes normally .
 * @ return the new Observable instance
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > concatWith ( @ NonNull SingleSource < ? extends T > other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatWithSingle < T > ( this , other ) ) ;


signature:
public class Observable { /** * Returns an { @ code Observable } that emits the items from this { @ code Observable } followed by the success item or terminal events
 * of the other { @ link MaybeSource } .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concat . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatWith } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.10 - experimental
 * @ param other the MaybeSource whose signal should be emitted after this Observable completes normally .
 * @ return the new Observable instance
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > concatWith ( @ NonNull MaybeSource < ? extends T > other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatWithMaybe < T > ( this , other ) ) ;


signature:
public class Observable { /** * Returns an { @ code Observable } that emits items from this { @ code Observable } and when it completes normally , the
 * other { @ link CompletableSource } is subscribed to and the returned { @ code Observable } emits its terminal events .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concat . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatWith } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.10 - experimental
 * @ param other the { @ code CompletableSource } to subscribe to once the current { @ code Observable } completes normally
 * @ return the new Observable instance
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > concatWith ( @ NonNull CompletableSource other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableConcatWithCompletable < T > ( this , other ) ) ;


signature:
public class Observable { /** * Returns a Single that emits a Boolean that indicates whether the source ObservableSource emitted a
 * specified item .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / contains . 2 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code contains } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param element
 * the item to search for in the emissions from the source ObservableSource
 * @ return a Single that emits { @ code true } if the specified item is emitted by the source ObservableSource ,
 * or { @ code false } if the source ObservableSource completes without emitting that item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / contains . html " > ReactiveX operators documentation : Contains < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < Boolean > contains ( final Object element ) { } }

implementation: ObjectHelper . requireNonNull ( element , "element is null" ) ; return any ( Functions . equalsWith ( element ) ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , except that it drops items emitted by the
 * source ObservableSource that are followed by another item within a computed debounce duration .
 * < img width = " 640 " height = " 425 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / debounce . f . png " alt = " " >
 * The delivery of the item happens on the thread of the first { @ code onNext } or { @ code onComplete }
 * signal of the generated { @ code ObservableSource } sequence ,
 * which if takes too long , a newer item may arrive from the upstream , causing the
 * generated sequence to get disposed , which may also interrupt any downstream blocking operation
 * ( yielding an { @ code InterruptedException } ) . It is recommended processing items
 * that may take long time to be moved to another thread via { @ link # observeOn } applied after
 * { @ code debounce } itself .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code debounce } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U >
 * the debounce value type ( ignored )
 * @ param debounceSelector
 * function to retrieve a sequence that indicates the throttle duration for each item
 * @ return an Observable that omits items emitted by the source ObservableSource that are followed by another item
 * within a computed debounce duration
 * @ see < a href = " http : / / reactivex . io / documentation / operators / debounce . html " > ReactiveX operators documentation : Debounce < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Observable < T > debounce ( Function < ? super T , ? extends ObservableSource < U > > debounceSelector ) { } }

implementation: ObjectHelper . requireNonNull ( debounceSelector , "debounceSelector is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableDebounce < T , U > ( this , debounceSelector ) ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , except that it drops items emitted by the
 * source ObservableSource that are followed by newer items before a timeout value expires . The timer resets on
 * each emission .
 * < em > Note : < / em > If items keep being emitted by the source ObservableSource faster than the timeout then no items
 * will be emitted by the resulting ObservableSource .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / debounce . png " alt = " " >
 * Delivery of the item after the grace period happens on the { @ code computation } { @ code Scheduler } ' s
 * { @ code Worker } which if takes too long , a newer item may arrive from the upstream , causing the
 * { @ code Worker } ' s task to get disposed , which may also interrupt any downstream blocking operation
 * ( yielding an { @ code InterruptedException } ) . It is recommended processing items
 * that may take long time to be moved to another thread via { @ link # observeOn } applied after
 * { @ code debounce } itself .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code debounce } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timeout
 * the length of the window of time that must pass after the emission of an item from the source
 * ObservableSource in which that ObservableSource emits no items in order for the item to be emitted by the
 * resulting ObservableSource
 * @ param unit
 * the unit of time for the specified { @ code timeout }
 * @ return an Observable that filters out items from the source ObservableSource that are too quickly followed by
 * newer items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / debounce . html " > ReactiveX operators documentation : Debounce < / a >
 * @ see # throttleWithTimeout ( long , TimeUnit ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > debounce ( long timeout , TimeUnit unit ) { } }

implementation: return debounce ( timeout , unit , Schedulers . computation ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , except that it drops items emitted by the
 * source ObservableSource that are followed by newer items before a timeout value expires on a specified
 * Scheduler . The timer resets on each emission .
 * < em > Note : < / em > If items keep being emitted by the source ObservableSource faster than the timeout then no items
 * will be emitted by the resulting ObservableSource .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / debounce . s . png " alt = " " >
 * Delivery of the item after the grace period happens on the given { @ code Scheduler } ' s
 * { @ code Worker } which if takes too long , a newer item may arrive from the upstream , causing the
 * { @ code Worker } ' s task to get disposed , which may also interrupt any downstream blocking operation
 * ( yielding an { @ code InterruptedException } ) . It is recommended processing items
 * that may take long time to be moved to another thread via { @ link # observeOn } applied after
 * { @ code debounce } itself .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timeout
 * the time each item has to be " the most recent " of those emitted by the source ObservableSource to
 * ensure that it ' s not dropped
 * @ param unit
 * the unit of time for the specified { @ code timeout }
 * @ param scheduler
 * the { @ link Scheduler } to use internally to manage the timers that handle the timeout for each
 * item
 * @ return an Observable that filters out items from the source ObservableSource that are too quickly followed by
 * newer items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / debounce . html " > ReactiveX operators documentation : Debounce < / a >
 * @ see # throttleWithTimeout ( long , TimeUnit , Scheduler ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > debounce ( long timeout , TimeUnit unit , Scheduler scheduler ) { } }

implementation: ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableDebounceTimed < T > ( this , timeout , unit , scheduler ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits the items emitted by the source ObservableSource or a specified default item
 * if the source ObservableSource is empty .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / defaultIfEmpty . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code defaultIfEmpty } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param defaultItem
 * the item to emit if the source ObservableSource emits no items
 * @ return an Observable that emits either the specified default item if the source ObservableSource emits no
 * items , or the items emitted by the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / defaultifempty . html " > ReactiveX operators documentation : DefaultIfEmpty < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > defaultIfEmpty ( T defaultItem ) { } }

implementation: ObjectHelper . requireNonNull ( defaultItem , "defaultItem is null" ) ; return switchIfEmpty ( just ( defaultItem ) ) ;


signature:
public class Observable { /** * Returns an Observable that delays the emissions of the source ObservableSource via another ObservableSource on a
 * per - item basis .
 * < img width = " 640 " height = " 450 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / delay . o . png " alt = " " >
 * < em > Note : < / em > the resulting ObservableSource will immediately propagate any { @ code onError } notification
 * from the source ObservableSource .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code delay } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U >
 * the item delay value type ( ignored )
 * @ param itemDelay
 * a function that returns an ObservableSource for each item emitted by the source ObservableSource , which is
 * then used to delay the emission of that item by the resulting ObservableSource until the ObservableSource
 * returned from { @ code itemDelay } emits an item
 * @ return an Observable that delays the emissions of the source ObservableSource via another ObservableSource on a
 * per - item basis
 * @ see < a href = " http : / / reactivex . io / documentation / operators / delay . html " > ReactiveX operators documentation : Delay < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Observable < T > delay ( final Function < ? super T , ? extends ObservableSource < U > > itemDelay ) { } }

implementation: ObjectHelper . requireNonNull ( itemDelay , "itemDelay is null" ) ; return flatMap ( ObservableInternalHelper . itemDelay ( itemDelay ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits the items emitted by the source ObservableSource shifted forward in time by a
 * specified delay . Error notifications from the source ObservableSource are not delayed .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / delay . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param delay
 * the delay to shift the source by
 * @ param unit
 * the time unit of { @ code delay }
 * @ param scheduler
 * the { @ link Scheduler } to use for delaying
 * @ return the source ObservableSource shifted in time by the specified delay
 * @ see < a href = " http : / / reactivex . io / documentation / operators / delay . html " > ReactiveX operators documentation : Delay < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > delay ( long delay , TimeUnit unit , Scheduler scheduler ) { } }

implementation: return delay ( delay , unit , scheduler , false ) ;


signature:
public class Observable { /** * Returns an Observable that emits the items emitted by the source ObservableSource shifted forward in time by a
 * specified delay . If { @ code delayError } is true , error notifications will also be delayed .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / delay . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param delay
 * the delay to shift the source by
 * @ param unit
 * the time unit of { @ code delay }
 * @ param scheduler
 * the { @ link Scheduler } to use for delaying
 * @ param delayError
 * if true , the upstream exception is signalled with the given delay , after all preceding normal elements ,
 * if false , the upstream exception is signalled immediately
 * @ return the source ObservableSource shifted in time by the specified delay
 * @ see < a href = " http : / / reactivex . io / documentation / operators / delay . html " > ReactiveX operators documentation : Delay < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > delay ( long delay , TimeUnit unit , Scheduler scheduler , boolean delayError ) { } }

implementation: ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableDelay < T > ( this , delay , unit , scheduler , delayError ) ) ;