signature:
public class Flowable { /** * Constructs a Publisher that creates a dependent resource object which is disposed of on cancellation .
 * < img width = " 640 " height = " 400 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / using . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator is a pass - through for backpressure and otherwise depends on the
 * backpressure support of the Publisher returned by the { @ code resourceFactory } . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code using } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < T > the element type of the generated Publisher
 * @ param < D > the type of the resource associated with the output sequence
 * @ param resourceSupplier
 * the factory function to create a resource object that depends on the Publisher
 * @ param sourceSupplier
 * the factory function to create a Publisher
 * @ param resourceDisposer
 * the function that will dispose of the resource
 * @ return the Publisher whose lifetime controls the lifetime of the dependent resource object
 * @ see < a href = " http : / / reactivex . io / documentation / operators / using . html " > ReactiveX operators documentation : Using < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . PASS_THROUGH ) @ SchedulerSupport ( SchedulerSupport . NONE ) public static < T , D > Flowable < T > using ( Callable < ? extends D > resourceSupplier , Function < ? super D , ? extends Publisher < ? extends T > > sourceSupplier , Consumer < ? super D > resourceDisposer ) { } }

implementation: return using ( resourceSupplier , sourceSupplier , resourceDisposer , true ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits the results of a specified combiner function applied to combinations of
 * items emitted , in sequence , by an Iterable of other Publishers .
 * { @ code zip } applies this function in strict sequence , so the first item emitted by the new Publisher
 * will be the result of the function applied to the first item emitted by each of the source Publishers ;
 * the second item emitted by the new Publisher will be the result of the function applied to the second
 * item emitted by each of those Publishers ; and so forth .
 * The resulting { @ code Publisher < R > } returned from { @ code zip } will invoke { @ code onNext } as many times as
 * the number of { @ code onNext } invocations of the source Publisher that emits the fewest items .
 * The operator subscribes to its sources in the order they are specified and completes eagerly if
 * one of the sources is shorter than the rest while canceling the other sources . Therefore , it
 * is possible those other sources will never be able to run to completion ( and thus not calling
 * { @ code doOnComplete ( ) } ) . This can also happen if the sources are exactly the same length ; if
 * source A completes and B has been consumed and is about to complete , the operator detects A won ' t
 * be sending further values and it will cancel B immediately . For example :
 * < pre > < code > zip ( Arrays . asList ( range ( 1 , 5 ) . doOnComplete ( action1 ) , range ( 6 , 5 ) . doOnComplete ( action2 ) ) , ( a ) - & gt ; a ) < / code > < / pre >
 * { @ code action1 } will be called but { @ code action2 } won ' t .
 * < br > To work around this termination property ,
 * use { @ link # doOnCancel ( Action ) } as well or use { @ code using ( ) } to do cleanup in case of completion
 * or cancellation .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / zip . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator expects backpressure from the sources and honors backpressure from the downstream .
 * ( I . e . , zipping with { @ link # interval ( long , TimeUnit ) } may result in MissingBackpressureException , use
 * one of the { @ code onBackpressureX } to handle similar , backpressure - ignoring sources . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code zip } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < T > the common value type
 * @ param < R > the zipped result type
 * @ param sources
 * an Iterable of source Publishers
 * @ param zipper
 * a function that , when applied to an item emitted by each of the source Publishers , results in
 * an item that will be emitted by the resulting Publisher
 * @ return a Flowable that emits the zipped results
 * @ see < a href = " http : / / reactivex . io / documentation / operators / zip . html " > ReactiveX operators documentation : Zip < / a > */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public static < T , R > Flowable < R > zip ( Iterable < ? extends Publisher < ? extends T > > sources , Function < ? super Object [ ] , ? extends R > zipper ) { } }

implementation: ObjectHelper . requireNonNull ( zipper , "zipper is null" ) ; ObjectHelper . requireNonNull ( sources , "sources is null" ) ; return RxJavaPlugins . onAssembly ( new FlowableZip < T , R > ( null , sources , zipper , bufferSize ( ) , false ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits the results of a specified combiner function applied to combinations of
 * < i > n < / i > items emitted , in sequence , by the < i > n < / i > Publishers emitted by a specified Publisher .
 * { @ code zip } applies this function in strict sequence , so the first item emitted by the new Publisher
 * will be the result of the function applied to the first item emitted by each of the Publishers emitted
 * by the source Publisher ; the second item emitted by the new Publisher will be the result of the
 * function applied to the second item emitted by each of those Publishers ; and so forth .
 * The resulting { @ code Publisher < R > } returned from { @ code zip } will invoke { @ code onNext } as many times as
 * the number of { @ code onNext } invocations of the source Publisher that emits the fewest items .
 * The operator subscribes to its sources in the order they are specified and completes eagerly if
 * one of the sources is shorter than the rest while cancel the other sources . Therefore , it
 * is possible those other sources will never be able to run to completion ( and thus not calling
 * { @ code doOnComplete ( ) } ) . This can also happen if the sources are exactly the same length ; if
 * source A completes and B has been consumed and is about to complete , the operator detects A won ' t
 * be sending further values and it will cancel B immediately . For example :
 * < pre > < code > zip ( just ( range ( 1 , 5 ) . doOnComplete ( action1 ) , range ( 6 , 5 ) . doOnComplete ( action2 ) ) , ( a ) - & gt ; a ) < / code > < / pre >
 * { @ code action1 } will be called but { @ code action2 } won ' t .
 * < br > To work around this termination property ,
 * use { @ link # doOnCancel ( Action ) } as well or use { @ code using ( ) } to do cleanup in case of completion
 * or cancellation .
 * < img width = " 640 " height = " 370 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / zip . o . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator expects backpressure from the sources and honors backpressure from the downstream .
 * ( I . e . , zipping with { @ link # interval ( long , TimeUnit ) } may result in MissingBackpressureException , use
 * one of the { @ code onBackpressureX } to handle similar , backpressure - ignoring sources . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code zip } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < T > the value type of the inner Publishers
 * @ param < R > the zipped result type
 * @ param sources
 * a Publisher of source Publishers
 * @ param zipper
 * a function that , when applied to an item emitted by each of the Publishers emitted by
 * { @ code ws } , results in an item that will be emitted by the resulting Publisher
 * @ return a Flowable that emits the zipped results
 * @ see < a href = " http : / / reactivex . io / documentation / operators / zip . html " > ReactiveX operators documentation : Zip < / a > */
@ SuppressWarnings ( { } }

implementation: "rawtypes" , "unchecked" , "cast" } ) @ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public static < T , R > Flowable < R > zip ( Publisher < ? extends Publisher < ? extends T > > sources , final Function < ? super Object [ ] , ? extends R > zipper ) { ObjectHelper . requireNonNull ( zipper , "zipper is null" ) ; return fromPublisher ( sources ) . toList ( ) . flatMapPublisher ( ( Function ) FlowableInternalHelper . < T , R > zipIterable ( zipper ) ) ;


signature:
public class Flowable { /** * Calls the specified converter function during assembly time and returns its resulting value .
 * This allows fluent conversion to any other type .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The backpressure behavior depends on what happens in the { @ code converter } function . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code as } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.7 - experimental
 * @ param < R > the resulting object type
 * @ param converter the function that receives the current Flowable instance and returns a value
 * @ return the converted value
 * @ throws NullPointerException if converter is null
 * @ since 2.2 */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . SPECIAL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > R as ( @ NonNull FlowableConverter < T , ? extends R > converter ) { } }

implementation: return ObjectHelper . requireNonNull ( converter , "converter is null" ) . apply ( this ) ;


signature:
public class Flowable { /** * Returns the first item emitted by this { @ code Flowable } , or throws
 * { @ code NoSuchElementException } if it emits no items .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingFirst } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < dt > < b > Error handling : < / b > < / dt >
 * < dd > If the source signals an error , the operator wraps a checked { @ link Exception }
 * into { @ link RuntimeException } and throws that . Otherwise , { @ code RuntimeException } s and
 * { @ link Error } s are rethrown as they are . < / dd >
 * < / dl >
 * @ return the first item emitted by this { @ code Flowable }
 * @ throws NoSuchElementException
 * if this { @ code Flowable } emits no items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / first . html " > ReactiveX documentation : First < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final T blockingFirst ( ) { } }

implementation: BlockingFirstSubscriber < T > s = new BlockingFirstSubscriber < T > ( ) ; subscribe ( s ) ; T v = s . blockingGet ( ) ; if ( v != null ) { return v ; } throw new NoSuchElementException ( ) ;


signature:
public class Flowable { /** * Converts this { @ code Flowable } into an { @ link Iterable } .
 * < img width = " 640 " height = " 315 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . toIterable . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to honor backpressure otherwise the returned
 * Iterable ' s iterator will throw a { @ code MissingBackpressureException } . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingIterable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return an { @ link Iterable } version of this { @ code Flowable }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX documentation : To < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Iterable < T > blockingIterable ( ) { } }

implementation: return blockingIterable ( bufferSize ( ) ) ;


signature:
public class Flowable { /** * Converts this { @ code Flowable } into an { @ link Iterable } .
 * < img width = " 640 " height = " 315 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . toIterable . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to honor backpressure otherwise the returned
 * Iterable ' s iterator will throw a { @ code MissingBackpressureException } .
 * < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingIterable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param bufferSize the number of items to prefetch from the current Flowable
 * @ return an { @ link Iterable } version of this { @ code Flowable }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX documentation : To < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Iterable < T > blockingIterable ( int bufferSize ) { } }

implementation: ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; return new BlockingFlowableIterable < T > ( this , bufferSize ) ;


signature:
public class Flowable { /** * Returns the last item emitted by this { @ code Flowable } , or throws
 * { @ code NoSuchElementException } if this { @ code Flowable } emits no items .
 * < img width = " 640 " height = " 315 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . last . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingLast } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < dt > < b > Error handling : < / b > < / dt >
 * < dd > If the source signals an error , the operator wraps a checked { @ link Exception }
 * into { @ link RuntimeException } and throws that . Otherwise , { @ code RuntimeException } s and
 * { @ link Error } s are rethrown as they are . < / dd >
 * < / dl >
 * @ return the last item emitted by this { @ code Flowable }
 * @ throws NoSuchElementException
 * if this { @ code Flowable } emits no items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / last . html " > ReactiveX documentation : Last < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final T blockingLast ( ) { } }

implementation: BlockingLastSubscriber < T > s = new BlockingLastSubscriber < T > ( ) ; subscribe ( s ) ; T v = s . blockingGet ( ) ; if ( v != null ) { return v ; } throw new NoSuchElementException ( ) ;


signature:
public class Flowable { /** * Returns an { @ link Iterable } that always returns the item most recently emitted by this
 * { @ code Flowable } .
 * < img width = " 640 " height = " 490 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . mostRecent . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingMostRecent } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param initialItem
 * the initial item that the { @ link Iterable } sequence will yield if this
 * { @ code Flowable } has not yet emitted an item
 * @ return an { @ link Iterable } that on each iteration returns the item that this { @ code Flowable }
 * has most recently emitted
 * @ see < a href = " http : / / reactivex . io / documentation / operators / first . html " > ReactiveX documentation : First < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Iterable < T > blockingMostRecent ( T initialItem ) { } }

implementation: return new BlockingFlowableMostRecent < T > ( this , initialItem ) ;


signature:
public class Flowable { /** * Returns an { @ link Iterable } that blocks until this { @ code Flowable } emits another item , then
 * returns that item .
 * < img width = " 640 " height = " 490 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . next . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingNext } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return an { @ link Iterable } that blocks upon each iteration until this { @ code Flowable } emits
 * a new item , whereupon the Iterable returns that item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / takelast . html " > ReactiveX documentation : TakeLast < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Iterable < T > blockingNext ( ) { } }

implementation: return new BlockingFlowableNext < T > ( this ) ;


signature:
public class Flowable { /** * If this { @ code Flowable } completes after emitting a single item , return that item , otherwise
 * throw a { @ code NoSuchElementException } .
 * < img width = " 640 " height = " 315 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . single . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSingle } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < dt > < b > Error handling : < / b > < / dt >
 * < dd > If the source signals an error , the operator wraps a checked { @ link Exception }
 * into { @ link RuntimeException } and throws that . Otherwise , { @ code RuntimeException } s and
 * { @ link Error } s are rethrown as they are . < / dd >
 * < / dl >
 * @ return the single item emitted by this { @ code Flowable }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / first . html " > ReactiveX documentation : First < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final T blockingSingle ( ) { } }

implementation: return singleOrError ( ) . blockingGet ( ) ;


signature:
public class Flowable { /** * If this { @ code Flowable } completes after emitting a single item , return that item ; if it emits
 * more than one item , throw an { @ code IllegalArgumentException } ; if it emits no items , return a default
 * value .
 * < img width = " 640 " height = " 315 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . singleOrDefault . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSingle } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < dt > < b > Error handling : < / b > < / dt >
 * < dd > If the source signals an error , the operator wraps a checked { @ link Exception }
 * into { @ link RuntimeException } and throws that . Otherwise , { @ code RuntimeException } s and
 * { @ link Error } s are rethrown as they are . < / dd >
 * < / dl >
 * @ param defaultItem
 * a default value to return if this { @ code Flowable } emits no items
 * @ return the single item emitted by this { @ code Flowable } , or the default value if it emits no
 * items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / first . html " > ReactiveX documentation : First < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final T blockingSingle ( T defaultItem ) { } }

implementation: return single ( defaultItem ) . blockingGet ( ) ;


signature:
public class Flowable { /** * Returns a { @ link Future } representing the only value emitted by this { @ code Flowable } .
 * < img width = " 640 " height = " 324 " src = " https : / / github . com / ReactiveX / RxJava / wiki / images / rx - operators / Flowable . toFuture . png " alt = " " >
 * If the { @ link Flowable } emits more than one item , { @ link java . util . concurrent . Future } will receive an
 * { @ link java . lang . IndexOutOfBoundsException } . If the { @ link Flowable } is empty , { @ link java . util . concurrent . Future }
 * will receive a { @ link java . util . NoSuchElementException } . The { @ code Flowable } source has to terminate in order
 * for the returned { @ code Future } to terminate as well .
 * If the { @ code Flowable } may emit more than one item , use { @ code Flowable . toList ( ) . toFuture ( ) } .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < 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 Flowable }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX documentation : To < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Future < T > toFuture ( ) { } }

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


signature:
public class Flowable { /** * Subscribes to the source and calls the given callbacks < strong > on the current thread < / strong > .
 * If the Flowable 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 > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an unbounded manner
 * ( i . e . , no backpressure applied to it ) . < / dd >
 * < 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 ) */
@ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Consumer < ? super T > onNext ) { } }

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


signature:
public class Flowable { /** * Subscribes to the source and calls the given callbacks < strong > on the current thread < / strong > .
 * 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 > Backpressure : < / b > < / dt >
 * < dd > The operator consumes the source { @ code Flowable } in an bounded manner ( up to bufferSize
 * outstanding request amount for items ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSubscribe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.15 - experimental
 * @ 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 .
 * @ param bufferSize the size of the buffer
 * @ since 2.2 */
@ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Consumer < ? super T > onNext , Consumer < ? super Throwable > onError , Action onComplete , int bufferSize ) { } }

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


signature:
public class Flowable { /** * Subscribes to the source and calls the { @ link Subscriber } 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 Subscriber } cancels the { @ link Subscription } it receives via
 * { @ link Subscriber # onSubscribe ( Subscription ) } .
 * 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 > Backpressure : < / b > < / dt >
 * < dd > The supplied { @ code Subscriber } determines how backpressure is applied . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code blockingSubscribe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * The cancellation and backpressure is composed through .
 * @ param subscriber the subscriber to forward events and calls to in the current thread
 * @ since 2.0 */
@ BackpressureSupport ( BackpressureKind . SPECIAL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final void blockingSubscribe ( Subscriber < ? super T > subscriber ) { } }

implementation: FlowableBlockingSubscribe . subscribe ( this , subscriber ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits connected , non - overlapping buffers , each containing { @ code count } items . When the source
 * Publisher completes , the resulting Publisher emits the current buffer and propagates the notification from the
 * source Publisher . Note that if the source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream and expects the source { @ code Publisher } to honor it as
 * well , although not enforced ; violation < em > may < / em > lead to { @ code MissingBackpressureException } somewhere
 * downstream . < / dd >
 * < 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 a Flowable that emits connected , non - overlapping buffers , each containing at most
 * { @ code count } items from the source Publisher
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < List < T > > buffer ( int count ) { } }

implementation: return buffer ( count , count ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits buffers every { @ code skip } items , each containing { @ code count } items . When the source
 * Publisher completes , the resulting Publisher emits the current buffer and propagates the notification from the
 * source Publisher . Note that if the source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream and expects the source { @ code Publisher } to honor it as
 * well , although not enforced ; violation < em > may < / em > lead to { @ code MissingBackpressureException } somewhere
 * downstream . < / dd >
 * < 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 Publisher 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 a Flowable that emits buffers for every { @ code skip } item from the source Publisher and
 * containing at most { @ code count } items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < List < T > > buffer ( int count , int skip ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits buffers every { @ code skip } items , each containing { @ code count } items . When the source
 * Publisher completes , the resulting Publisher emits the current buffer and propagates the notification from the
 * source Publisher . Note that if the source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream and expects the source { @ code Publisher } to honor it as
 * well , although not enforced ; violation < em > may < / em > lead to { @ code MissingBackpressureException } somewhere
 * downstream . < / dd >
 * < 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 Publisher 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 a Flowable that emits buffers for every { @ code skip } item from the source Publisher and
 * containing at most { @ code count } items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U extends Collection < ? super T > > Flowable < 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 FlowableBuffer < T , U > ( this , count , skip , bufferSupplier ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits connected , non - overlapping buffers , each containing { @ code count } items . When the source
 * Publisher completes , the resulting Publisher emits the current buffer and propagates the notification from the
 * source Publisher . Note that if the source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream and expects the source { @ code Publisher } to honor it as
 * well , although not enforced ; violation < em > may < / em > lead to { @ code MissingBackpressureException } somewhere
 * downstream . < / dd >
 * < 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 a Flowable that emits connected , non - overlapping buffers , each containing at most
 * { @ code count } items from the source Publisher
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U extends Collection < ? super T > > Flowable < U > buffer ( int count , Callable < U > bufferSupplier ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher 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
 * Publisher completes , the resulting Publisher emits the current buffer and propagates the notification from the
 * source Publisher . Note that if the source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it uses time . It requests { @ code Long . MAX _ VALUE }
 * upstream and does not obey downstream requests . < / dd >
 * < 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 a Flowable that emits new buffers of items emitted by the source Publisher periodically after
 * a fixed timespan has elapsed
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Flowable < List < T > > buffer ( long timespan , long timeskip , TimeUnit unit ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher 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 Publisher completes , the resulting Publisher emits the current buffer
 * and propagates the notification from the source Publisher . Note that if the source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it uses time . It requests { @ code Long . MAX _ VALUE }
 * upstream and does not obey downstream requests . < / dd >
 * < 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 a Flowable that emits new buffers of items emitted by the source Publisher periodically after
 * a fixed timespan has elapsed
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < U extends Collection < ? super T > > Flowable < 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 FlowableBufferTimed < T , U > ( this , timespan , timeskip , unit , scheduler , bufferSupplier , Integer . MAX_VALUE , false ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits connected , non - overlapping buffers , each of a fixed duration specified by the
 * { @ code timespan } argument . When the source Publisher completes , the resulting Publisher emits the current buffer
 * and propagates the notification from the source Publisher . Note that if the source Publisher 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 / buffer5 . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it uses time . It requests { @ code Long . MAX _ VALUE }
 * upstream and does not obey downstream requests . < / dd >
 * < 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 that applies to the { @ code timespan } argument
 * @ return a Flowable that emits connected , non - overlapping buffers of items emitted by the source
 * Publisher within a fixed duration
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Flowable < List < T > > buffer ( long timespan , TimeUnit unit ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher 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 Publisher completes , the resulting
 * Publisher emits the current buffer and propagates the notification from the source Publisher . Note that if the
 * source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it uses time . It requests { @ code Long . MAX _ VALUE }
 * upstream and does not obey downstream requests . < / dd >
 * < 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 a Flowable that emits connected , non - overlapping buffers of items emitted by the source
 * Publisher 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 @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Flowable < 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 Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher 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 Publisher completes , the resulting
 * Publisher emits the current buffer and propagates the notification from the source Publisher . Note that if the
 * source Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it uses time . It requests { @ code Long . MAX _ VALUE }
 * upstream and does not obey downstream requests . < / dd >
 * < 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 a Flowable that emits connected , non - overlapping buffers of items emitted by the source
 * Publisher 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 @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < U extends Collection < ? super T > > Flowable < 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 FlowableBufferTimed < T , U > ( this , timespan , timespan , unit , scheduler , bufferSupplier , count , restartTimerOnMaxSize ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits buffers that it creates when the specified { @ code openingIndicator } Publisher emits an
 * item , and closes when the Publisher returned from { @ code closingIndicator } emits an item . If any of the source
 * Publisher , { @ 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it is instead controlled by the given Publishers and
 * buffers data . It requests { @ code Long . MAX _ VALUE } upstream and does not obey downstream requests . < / dd >
 * < 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 Publisher
 * @ param < TClosing > the element type of the individual buffer - closing Publishers
 * @ param openingIndicator
 * the Publisher that , when it emits an item , causes a new buffer to be created
 * @ param closingIndicator
 * the { @ link Function } that is used to produce a Publisher for every buffer created . When this
 * Publisher emits an item , the associated buffer is emitted .
 * @ return a Flowable that emits buffers , containing items from the source Publisher , that are created
 * and closed when the specified Publishers emit items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < TOpening , TClosing > Flowable < List < T > > buffer ( Flowable < ? extends TOpening > openingIndicator , Function < ? super TOpening , ? extends Publisher < ? extends TClosing > > closingIndicator ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits buffers of items it collects from the source Publisher . The resulting
 * Publisher emits buffers that it creates when the specified { @ code openingIndicator } Publisher emits an
 * item , and closes when the Publisher returned from { @ code closingIndicator } emits an item . If any of the source
 * Publisher , { @ 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it is instead controlled by the given Publishers and
 * buffers data . It requests { @ code Long . MAX _ VALUE } upstream and does not obey downstream requests . < / dd >
 * < 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 Publisher
 * @ param < TClosing > the element type of the individual buffer - closing Publishers
 * @ param openingIndicator
 * the Publisher that , when it emits an item , causes a new buffer to be created
 * @ param closingIndicator
 * the { @ link Function } that is used to produce a Publisher for every buffer created . When this
 * Publisher 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 a Flowable that emits buffers , containing items from the source Publisher , that are created
 * and closed when the specified Publishers emit items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < TOpening , TClosing , U extends Collection < ? super T > > Flowable < U > buffer ( Flowable < ? extends TOpening > openingIndicator , Function < ? super TOpening , ? extends Publisher < ? 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 FlowableBufferBoundary < T , U , TOpening , TClosing > ( this , openingIndicator , closingIndicator , bufferSupplier ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that emits non - overlapping buffered items from the source Publisher each time the
 * specified boundary Publisher 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 Publisher causes the returned Publisher to emit the
 * latest buffer and complete . If either the source Publisher or the boundary Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it is instead controlled by the { @ code Publisher }
 * { @ code boundary } and buffers data . It requests { @ code Long . MAX _ VALUE } upstream and does not obey
 * downstream requests . < / dd >
 * < 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 boundaryIndicator
 * the boundary Publisher
 * @ return a Flowable that emits buffered items from the source Publisher when the boundary Publisher
 * emits an item
 * @ see # buffer ( Publisher , int )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Flowable < List < T > > buffer ( Publisher < B > boundaryIndicator ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits non - overlapping buffered items from the source Publisher each time the
 * specified boundary Publisher 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 Publisher causes the returned Publisher to emit the
 * latest buffer and complete . If either the source Publisher or the boundary Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it is instead controlled by the { @ code Publisher }
 * { @ code boundary } and buffers data . It requests { @ code Long . MAX _ VALUE } upstream and does not obey
 * downstream requests . < / dd >
 * < 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 boundaryIndicator
 * the boundary Publisher
 * @ param initialCapacity
 * the initial capacity of each buffer chunk
 * @ return a Flowable that emits buffered items from the source Publisher when the boundary Publisher
 * emits an item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a >
 * @ see # buffer ( Publisher ) */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Flowable < List < T > > buffer ( Publisher < B > boundaryIndicator , final int initialCapacity ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that emits non - overlapping buffered items from the source Publisher each time the
 * specified boundary Publisher 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 Publisher causes the returned Publisher to emit the
 * latest buffer and complete . If either the source Publisher or the boundary Publisher 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it is instead controlled by the { @ code Publisher }
 * { @ code boundary } and buffers data . It requests { @ code Long . MAX _ VALUE } upstream and does not obey
 * downstream requests . < / dd >
 * < 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 boundaryIndicator
 * the boundary Publisher
 * @ param bufferSupplier
 * a factory function that returns an instance of the collection subclass to be used and returned
 * as the buffer
 * @ return a Flowable that emits buffered items from the source Publisher when the boundary Publisher
 * emits an item
 * @ see # buffer ( Publisher , int )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / buffer . html " > ReactiveX operators documentation : Buffer < / a > */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B , U extends Collection < ? super T > > Flowable < U > buffer ( Publisher < B > boundaryIndicator , Callable < U > bufferSupplier ) { } }

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


signature:
public class Flowable { /** * Returns a Flowable that subscribes to this Publisher 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 / cache . png " alt = " " >
 * This is useful when you want a Publisher to cache responses and you can ' t control the
 * subscribe / cancel behavior of all the { @ link Subscriber } s .
 * The operator subscribes only when the first downstream subscriber subscribes and maintains
 * a single subscription towards this Publisher . In contrast , the operator family of { @ link # replay ( ) }
 * that return a { @ link ConnectableFlowable } require an explicit call to { @ link ConnectableFlowable # connect ( ) } .
 * < em > Note : < / em > You sacrifice the ability to cancel the origin when you use the { @ code cache }
 * Subscriber so be careful not to use this Subscriber on Publishers 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 > Backpressure : < / b > < / dt >
 * < dd > The operator consumes this Publisher in an unbounded fashion but respects the backpressure
 * of each downstream Subscriber individually . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code cache } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return a Flowable 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 @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > cache ( ) { } }

implementation: return cacheWithInitialCapacity ( 16 ) ;


signature:
public class Flowable { /** * Returns a Flowable that subscribes to this Publisher 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 / cache . png " alt = " " >
 * This is useful when you want a Publisher to cache responses and you can ' t control the
 * subscribe / cancel behavior of all the { @ link Subscriber } s .
 * The operator subscribes only when the first downstream subscriber subscribes and maintains
 * a single subscription towards this Publisher . In contrast , the operator family of { @ link # replay ( ) }
 * that return a { @ link ConnectableFlowable } require an explicit call to { @ link ConnectableFlowable # connect ( ) } .
 * < em > Note : < / em > You sacrifice the ability to cancel the origin when you use the { @ code cache }
 * Subscriber so be careful not to use this Subscriber on Publishers 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 > Backpressure : < / b > < / dt >
 * < dd > The operator consumes this Publisher in an unbounded fashion but respects the backpressure
 * of each downstream Subscriber individually . < / dd >
 * < 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 ConnectableFlowable # autoConnect ( ) } or similar .
 * @ param initialCapacity hint for number of items to cache ( for optimizing underlying data structure )
 * @ return a Flowable 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 @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > cacheWithInitialCapacity ( int initialCapacity ) { } }

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


signature:
public class Flowable { /** * Collects items emitted by the finite source Publisher 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 . 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure because by intent it will receive all values and reduce
 * them to a single { @ code onNext } . < / dd >
 * < 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 initialItemSupplier
 * 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 Publisher
 * into a single mutable data structure
 * @ see < a href = " http : / / reactivex . io / documentation / operators / reduce . html " > ReactiveX operators documentation : Reduce < / a > */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Single < U > collect ( Callable < ? extends U > initialItemSupplier , BiConsumer < ? super U , ? super T > collector ) { } }

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


signature:
public class Flowable { /** * Transform a Publisher by applying a particular Transformer function to it .
 * This method operates on the Publisher itself whereas { @ link # lift } operates on the Publisher ' s
 * Subscribers or Subscribers .
 * If the operator you are creating is designed to act on the individual items emitted by a source
 * Publisher , use { @ link # lift } . If your operator is designed to transform the source Publisher as a whole
 * ( for instance , by applying a particular set of existing RxJava operators to it ) use { @ code compose } .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator itself doesn ' t interfere with the backpressure behavior which only depends
 * on what kind of { @ code Publisher } the transformer returns . < / dd >
 * < 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 Publisher
 * @ param composer implements the function that transforms the source Publisher
 * @ return the source Publisher , 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 @ BackpressureSupport ( BackpressureKind . PASS_THROUGH ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > compose ( FlowableTransformer < ? super T , ? extends R > composer ) { } }

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


signature:
public class Flowable { /** * Maps the upstream items into { @ link CompletableSource } s and subscribes to them one after the
 * other completes .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / concatMap . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to support backpressure . If this { @ code Flowable } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code concatMapCompletable } 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 # concatMapCompletableDelayError ( Function )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) @ BackpressureSupport ( BackpressureKind . FULL ) public final Completable concatMapCompletable ( Function < ? super T , ? extends CompletableSource > mapper ) { } }

implementation: return concatMapCompletable ( mapper , 2 ) ;


signature:
public class Flowable { /** * 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 Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to support backpressure . If this { @ code Flowable } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < 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 Flowable } or any of the
 * inner { @ code CompletableSource } s are delayed until all
 * of them terminate . If { @ code false } , an error from this
 * { @ code Flowable } is delayed until the current inner
 * { @ code CompletableSource } terminates and only then is
 * it emitted to the downstream .
 * @ return a new Completable instance
 * @ see # concatMapCompletable ( Function )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) @ BackpressureSupport ( BackpressureKind . FULL ) public final Completable concatMapCompletableDelayError ( Function < ? super T , ? extends CompletableSource > mapper , boolean tillTheEnd ) { } }

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


signature:
public class Flowable { /** * 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 Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to support backpressure . If this { @ code Flowable } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < 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 Flowable } or any of the
 * inner { @ code CompletableSource } s are delayed until all
 * of them terminate . If { @ code false } , an error from this
 * { @ code Flowable } 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 @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) @ BackpressureSupport ( BackpressureKind . FULL ) 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 FlowableConcatMapCompletable < T > ( this , mapper , tillTheEnd ? ErrorMode . END : ErrorMode . BOUNDARY , prefetch ) ) ;


signature:
public class Flowable { /** * Maps each of the items into a Publisher , 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 Publishers
 * till all of them terminate .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream . Both this and the inner { @ code Publisher } s are
 * expected to honor backpressure as well . If the source { @ code Publisher } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . If any of the inner { @ code Publisher } s doesn ' t honor
 * backpressure , that < em > may < / em > throw an { @ code IllegalStateException } when that
 * { @ code Publisher } completes . < / dd >
 * < 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 Publisher into the inner Publishers .
 * @ return the new Publisher instance with the concatenation behavior */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > concatMapDelayError ( Function < ? super T , ? extends Publisher < ? extends R > > mapper ) { } }

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


signature:
public class Flowable { /** * Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single
 * Publisher .
 * Eager concatenation means that once a subscriber subscribes , this operator subscribes to all of the
 * source Publishers . The operator buffers the values emitted by these Publishers and then drains them in
 * order , each one after the previous one completes .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > Backpressure is honored towards the downstream , however , due to the eagerness requirement , sources
 * are subscribed to in unbounded mode and their values are queued up in an unbounded buffer . < / dd >
 * < 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 Publishers that will be
 * eagerly concatenated
 * @ param maxConcurrency the maximum number of concurrent subscribed Publishers
 * @ param prefetch hints about the number of expected values from each inner Publisher , must be positive
 * @ return the new Publisher instance with the specified concatenation behavior
 * @ since 2.0 */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > concatMapEager ( Function < ? super T , ? extends Publisher < ? 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 FlowableConcatMapEager < T , R > ( this , mapper , maxConcurrency , prefetch , ErrorMode . IMMEDIATE ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that concatenate each item emitted by the source Publisher with the values in an
 * Iterable corresponding to that item that is generated by a selector .
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream . The source { @ code Publisher } s is
 * expected to honor backpressure as well . If the source { @ code Publisher } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < 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 Publisher
 * @ param mapper
 * a function that returns an Iterable sequence of values for when given an item emitted by the
 * source Publisher
 * @ return a Flowable that emits the results of concatenating the items emitted by the source Publisher 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 @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Flowable < U > concatMapIterable ( Function < ? super T , ? extends Iterable < ? extends U > > mapper ) { } }

implementation: return concatMapIterable ( mapper , 2 ) ;


signature:
public class Flowable { /** * 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 Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to support backpressure and honors
 * the backpressure from downstream . If this { @ code Flowable } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < 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 Flowable instance
 * @ see # concatMapMaybeDelayError ( Function )
 * @ see # concatMapMaybe ( Function , int )
 * @ since 2.2 */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > concatMapMaybe ( Function < ? super T , ? extends MaybeSource < ? extends R > > mapper ) { } }

implementation: return concatMapMaybe ( mapper , 2 ) ;


signature:
public class Flowable { /** * 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 Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to support backpressure and honors
 * the backpressure from downstream . If this { @ code Flowable } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < 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 Flowable instance
 * @ see # concatMapSingle ( Function )
 * @ see # concatMapSingleDelayError ( Function , boolean , int )
 * @ since 2.2 */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < 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 FlowableConcatMapSingle < T , R > ( this , mapper , ErrorMode . IMMEDIATE , prefetch ) ) ;


signature:
public class Flowable { /** * Maps the upstream items into { @ link SingleSource } s and subscribes to them one after the
 * other succeeds or fails , emits their success values and delays all errors
 * till both this { @ code Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator expects the upstream to support backpressure and honors
 * the backpressure from downstream . If this { @ code Flowable } violates the rule , the operator will
 * signal a { @ code MissingBackpressureException } . < / dd >
 * < 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
 * @ return a new Flowable instance
 * @ see # concatMapSingle ( Function )
 * @ see # concatMapSingleDelayError ( Function , boolean )
 * @ since 2.2 */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > concatMapSingleDelayError ( Function < ? super T , ? extends SingleSource < ? extends R > > mapper ) { } }

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


signature:
public class Flowable { /** * Returns a { @ code Flowable } that emits the items from this { @ code Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator supports backpressure and makes sure the success item of the other { @ code SingleSource }
 * is only emitted when there is a demand for it . < / dd >
 * < 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 Flowable } completes normally .
 * @ return the new Flowable instance
 * @ since 2.2 */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > concatWith ( @ NonNull SingleSource < ? extends T > other ) { } }

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


signature:
public class Flowable { /** * Returns a { @ code Flowable } that emits the items from this { @ code Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator supports backpressure and makes sure the success item of the other { @ code MaybeSource }
 * is only emitted when there is a demand for it . < / dd >
 * < 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 Flowable completes normally .
 * @ return the new Flowable instance
 * @ since 2.2 */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > concatWith ( @ NonNull MaybeSource < ? extends T > other ) { } }

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


signature:
public class Flowable { /** * Returns a { @ code Flowable } that emits items from this { @ code Flowable } and when it completes normally , the
 * other { @ link CompletableSource } is subscribed to and the returned { @ code Flowable } 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 > Backpressure : < / b > < / dt >
 * < dd > The operator does not interfere with backpressure between the current Flowable and the
 * downstream consumer ( i . e . , acts as pass - through ) . When the operator switches to the
 * { @ code Completable } , backpressure is no longer present because { @ code Completable } doesn ' t
 * have items to apply backpressure to . < / dd >
 * < 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 Flowable } completes normally
 * @ return the new Flowable instance
 * @ since 2.2 */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . PASS_THROUGH ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > concatWith ( @ NonNull CompletableSource other ) { } }

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


signature:
public class Flowable { /** * Returns a Single that emits a Boolean that indicates whether the source Publisher emitted a
 * specified item .
 * < img width = " 640 " height = " 320 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / contains . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream and consumes the source { @ code Publisher } in an
 * unbounded manner ( i . e . , without applying backpressure ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code contains } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param item
 * the item to search for in the emissions from the source Publisher
 * @ return a Flowable that emits { @ code true } if the specified item is emitted by the source Publisher ,
 * or { @ code false } if the source Publisher completes without emitting that item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / contains . html " > ReactiveX operators documentation : Contains < / a > */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < Boolean > contains ( final Object item ) { } }

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


signature:
public class Flowable { /** * Returns a Single that counts the total number of items emitted by the source Publisher and emits
 * this count as a 64 - bit Long .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / longCount . png " alt = " " >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator honors backpressure from downstream and consumes the source { @ code Publisher } in an
 * unbounded manner ( i . e . , without applying backpressure ) . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code count } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return a Single that emits a single item : the number of items emitted by the source Publisher as a
 * 64 - bit Long item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / count . html " > ReactiveX operators documentation : Count < / a >
 * @ see # count ( ) */
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < Long > count ( ) { } }

implementation: return RxJavaPlugins . onAssembly ( new FlowableCountSingle < T > ( this ) ) ;


signature:
public class Flowable { /** * Returns a Flowable that mirrors the source Publisher , except that it drops items emitted by the
 * source Publisher 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 Publisher } sequence ,
 * which if takes too long , a newer item may arrive from the upstream , causing the
 * generated sequence to get cancelled , 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 > Backpressure : < / b > < / dt >
 * < dd > This operator does not support backpressure as it uses the { @ code debounceSelector } to mark
 * boundaries . < / dd >
 * < 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 debounceIndicator
 * function to retrieve a sequence that indicates the throttle duration for each item
 * @ return a Flowable that omits items emitted by the source Publisher 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 >
 * @ see < a href = " https : / / github . com / ReactiveX / RxJava / wiki / Backpressure " > RxJava wiki : Backpressure < / a > */
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . ERROR ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Flowable < T > debounce ( Function < ? super T , ? extends Publisher < U > > debounceIndicator ) { } }

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