signature:
public class Observable { /** * Maps the upstream items into { @ link MaybeSource } s and switches ( subscribes ) to the newer ones
 * while disposing the older ones ( and ignoring their signals ) and emits the latest success value of the current one if
 * available while failing immediately if this { @ code Observable } or any of the
 * active inner { @ code MaybeSource } s fail .
 * < img width = " 640 " height = " 350 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / switchMap . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code switchMapMaybe } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < dt > < b > Error handling : < / b > < / dt >
 * < dd > This operator terminates with an { @ code onError } if this { @ code Observable } or any of
 * the inner { @ code MaybeSource } s fail while they are active . When this happens concurrently , their
 * individual { @ code Throwable } errors may get combined and emitted as a single
 * { @ link io . reactivex . exceptions . CompositeException CompositeException } . Otherwise , a late
 * ( i . e . , inactive or switched out ) { @ code onError } from this { @ code Observable } or from any of
 * the inner { @ code MaybeSource } s will be forwarded to the global error handler via
 * { @ link io . reactivex . plugins . RxJavaPlugins # onError ( Throwable ) } as
 * { @ link io . reactivex . exceptions . UndeliverableException UndeliverableException } < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the output value type
 * @ param mapper the function called with the current upstream event and should
 * return a { @ code MaybeSource } to replace the current active inner source
 * and get subscribed to .
 * @ return the new Observable instance
 * @ see # switchMapMaybe ( Function )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > switchMapMaybe ( @ NonNull Function < ? super T , ? extends MaybeSource < ? extends R > > mapper ) { } }

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


signature:
public class Observable { /** * Maps the upstream items into { @ link MaybeSource } s and switches ( subscribes ) to the newer ones
 * while disposing the older ones ( and ignoring their signals ) and emits the latest success value of the current one if
 * available , delaying errors from this { @ code Observable } or the inner { @ code MaybeSource } s until all terminate .
 * < img width = " 640 " height = " 350 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / switchMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code switchMapMaybeDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.11 - experimental
 * @ param < R > the output value type
 * @ param mapper the function called with the current upstream event and should
 * return a { @ code MaybeSource } to replace the current active inner source
 * and get subscribed to .
 * @ return the new Observable instance
 * @ see # switchMapMaybe ( Function )
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > switchMapMaybeDelayError ( @ NonNull Function < ? super T , ? extends MaybeSource < ? extends R > > mapper ) { } }

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


signature:
public class Observable { /** * Returns a new ObservableSource by applying a function that you supply to each item emitted by the source
 * ObservableSource that returns a SingleSource , and then emitting the item emitted by the most recently emitted
 * of these SingleSources .
 * The resulting ObservableSource completes if both the upstream ObservableSource and the last inner SingleSource , if any , complete .
 * If the upstream ObservableSource signals an onError , the inner SingleSource is disposed and the error delivered in - sequence .
 * < img width = " 640 " height = " 531 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / switchMapSingle . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code switchMapSingle } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.0.8 - experimental
 * @ param < R > the element type of the inner SingleSources and the output
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns a
 * SingleSource
 * @ return an Observable that emits the item emitted by the SingleSource returned from applying { @ code func } to the most recently emitted item emitted by the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a >
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) @ NonNull public final < R > Observable < R > switchMapSingle ( @ NonNull Function < ? super T , ? extends SingleSource < ? extends R > > mapper ) { } }

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


signature:
public class Observable { /** * Returns a new ObservableSource by applying a function that you supply to each item emitted by the source
 * ObservableSource that returns a SingleSource , and then emitting the item emitted by the most recently emitted
 * of these SingleSources and delays any error until all SingleSources terminate .
 * The resulting ObservableSource completes if both the upstream ObservableSource and the last inner SingleSource , if any , complete .
 * If the upstream ObservableSource signals an onError , the termination of the last inner SingleSource will emit that error as is
 * or wrapped into a CompositeException along with the other possible errors the former inner SingleSources signalled .
 * < img width = " 640 " height = " 467 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / switchMapSingleDelayError . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code switchMapSingleDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.0.8 - experimental
 * @ param < R > the element type of the inner SingleSources and the output
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns a
 * SingleSource
 * @ return an Observable that emits the item emitted by the SingleSource returned from applying { @ code func } to the most recently emitted item emitted by the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a >
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) @ NonNull public final < R > Observable < R > switchMapSingleDelayError ( @ NonNull Function < ? super T , ? extends SingleSource < ? extends R > > mapper ) { } }

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


signature:
public class Observable { /** * Returns a new ObservableSource by applying a function that you supply to each item emitted by the source
 * ObservableSource that returns an ObservableSource , and then emitting the items emitted by the most recently emitted
 * of these ObservableSources and delays any error until all ObservableSources terminate .
 * The resulting ObservableSource completes if both the upstream ObservableSource and the last inner ObservableSource , if any , complete .
 * If the upstream ObservableSource signals an onError , the termination of the last inner ObservableSource will emit that error as is
 * or wrapped into a CompositeException along with the other possible errors the former inner ObservableSources signalled .
 * < img width = " 640 " height = " 350 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / switchMap . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code switchMapDelayError } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < R > the element type of the inner ObservableSources and the output
 * @ param mapper
 * a function that , when applied to an item emitted by the source ObservableSource , returns an
 * ObservableSource
 * @ return an Observable that emits the items emitted by the ObservableSource returned from applying { @ code func } to the most recently emitted item emitted by the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / flatmap . html " > ReactiveX operators documentation : FlatMap < / a >
 * @ since 2.0 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > switchMapDelayError ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper ) { } }

implementation: return switchMapDelayError ( mapper , bufferSize ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits only the first { @ code count } items emitted by the source ObservableSource . If the source emits fewer than
 * { @ code count } items then all of its items are emitted .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / take . png " alt = " " >
 * This method returns an ObservableSource that will invoke a subscribing { @ link Observer } ' s
 * { @ link Observer # onNext onNext } function a maximum of { @ code count } times before invoking
 * { @ link Observer # onComplete onComplete } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code take } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param count
 * the maximum number of items to emit
 * @ return an Observable that emits only the first { @ code count } items emitted by the source ObservableSource , or
 * all of the items from the source ObservableSource if that ObservableSource emits fewer than { @ code count } items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / take . html " > ReactiveX operators documentation : Take < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > take ( long count ) { } }

implementation: if ( count < 0 ) { throw new IllegalArgumentException ( "count >= 0 required but it was " + count ) ; } return RxJavaPlugins . onAssembly ( new ObservableTake < T > ( this , count ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits those items emitted by source ObservableSource before a specified time runs
 * out .
 * If time runs out before the { @ code Observable } completes normally , the { @ code onComplete } event will be
 * signaled on the default { @ code computation } { @ link Scheduler } .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / take . t . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code take } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param time
 * the length of the time window
 * @ param unit
 * the time unit of { @ code time }
 * @ return an Observable that emits those items emitted by the source ObservableSource before the time runs out
 * @ see < a href = " http : / / reactivex . io / documentation / operators / take . html " > ReactiveX operators documentation : Take < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > take ( long time , TimeUnit unit ) { } }

implementation: return takeUntil ( timer ( time , unit ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits those items emitted by source ObservableSource before a specified time ( on a
 * specified Scheduler ) runs out .
 * If time runs out before the { @ code Observable } completes normally , the { @ code onComplete } event will be
 * signaled on the provided { @ link Scheduler } .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / take . ts . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param time
 * the length of the time window
 * @ param unit
 * the time unit of { @ code time }
 * @ param scheduler
 * the Scheduler used for time source
 * @ return an Observable that emits those items emitted by the source ObservableSource before the time runs out ,
 * according to the specified Scheduler
 * @ see < a href = " http : / / reactivex . io / documentation / operators / take . html " > ReactiveX operators documentation : Take < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > take ( long time , TimeUnit unit , Scheduler scheduler ) { } }

implementation: return takeUntil ( timer ( time , unit , scheduler ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits at most the last { @ code count } items emitted by the source ObservableSource . If the source emits fewer than
 * { @ code count } items then all of its items are emitted .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / takeLast . n . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code takeLast } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param count
 * the maximum number of items to emit from the end of the sequence of items emitted by the source
 * ObservableSource
 * @ return an Observable that emits at most the last { @ code count } items emitted by the source ObservableSource
 * @ throws IndexOutOfBoundsException
 * if { @ code count } is less than zero
 * @ see < a href = " http : / / reactivex . io / documentation / operators / takelast . html " > ReactiveX operators documentation : TakeLast < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > takeLast ( int count ) { } }

implementation: if ( count < 0 ) { throw new IndexOutOfBoundsException ( "count >= 0 required but it was " + count ) ; } else if ( count == 0 ) { return RxJavaPlugins . onAssembly ( new ObservableIgnoreElements < T > ( this ) ) ; } else if ( count == 1 ) { return RxJavaPlugins . onAssembly ( new ObservableTakeLastOne < T > ( this ) ) ; } return RxJavaPlugins . onAssembly ( new ObservableTakeLast < T > ( this , count ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits at most a specified number of items from the source ObservableSource that were
 * emitted in a specified window of time before the ObservableSource completed , where the timing information is
 * provided by a given Scheduler .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / takeLast . tns . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use for tracking the current time < / dd >
 * < / dl >
 * @ param count
 * the maximum number of items to emit
 * @ param time
 * the length of the time window
 * @ param unit
 * the time unit of { @ code time }
 * @ param scheduler
 * the { @ link Scheduler } that provides the timestamps for the observed items
 * @ param delayError
 * if true , an exception signalled by the current Observable is delayed until the regular elements are consumed
 * by the downstream ; if false , an exception is immediately signalled and all regular elements dropped
 * @ param bufferSize
 * the hint about how many elements to expect to be last
 * @ return an Observable that emits at most { @ code count } items from the source ObservableSource that were emitted
 * in a specified window of time before the ObservableSource completed , where the timing information is
 * provided by the given { @ code scheduler }
 * @ throws IndexOutOfBoundsException
 * if { @ code count } is less than zero
 * @ see < a href = " http : / / reactivex . io / documentation / operators / takelast . html " > ReactiveX operators documentation : TakeLast < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > takeLast ( long count , long time , TimeUnit unit , Scheduler scheduler , boolean delayError , int bufferSize ) { } }

implementation: ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; if ( count < 0 ) { throw new IndexOutOfBoundsException ( "count >= 0 required but it was " + count ) ; } return RxJavaPlugins . onAssembly ( new ObservableTakeLastTimed < T > ( this , count , time , unit , scheduler , bufferSize , delayError ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits the items emitted by the source Observable until a second ObservableSource
 * emits an item .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / takeUntil . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code takeUntil } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param other
 * the ObservableSource whose first emitted item will cause { @ code takeUntil } to stop emitting items
 * from the source Observable
 * @ param < U >
 * the type of items emitted by { @ code other }
 * @ return an Observable that emits the items emitted by the source Observable until such time as { @ code other } emits its first item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / takeuntil . html " > ReactiveX operators documentation : TakeUntil < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Observable < T > takeUntil ( ObservableSource < U > other ) { } }

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


signature:
public class Observable { /** * Returns an Observable that emits items emitted by the source ObservableSource so long as each item satisfied a
 * specified condition , and then completes as soon as this condition is not satisfied .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / takeWhile . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code takeWhile } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param predicate
 * a function that evaluates an item emitted by the source ObservableSource and returns a Boolean
 * @ return an Observable that emits the items from the source ObservableSource so long as each item satisfies the
 * condition defined by { @ code predicate } , then completes
 * @ see < a href = " http : / / reactivex . io / documentation / operators / takewhile . html " > ReactiveX operators documentation : TakeWhile < / a >
 * @ see Observable # takeUntil ( Predicate ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > takeWhile ( Predicate < ? super T > predicate ) { } }

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


signature:
public class Observable { /** * Returns an Observable that emits only the first item emitted by the source ObservableSource during sequential
 * time windows of a specified duration .
 * This differs from { @ link # throttleLast } in that this only tracks passage of time whereas
 * { @ link # throttleLast } ticks at scheduled intervals .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / throttleFirst . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code throttleFirst } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param windowDuration
 * time to wait before emitting another item after emitting the last item
 * @ param unit
 * the unit of time of { @ code windowDuration }
 * @ return an Observable that performs the throttle operation
 * @ see < a href = " http : / / reactivex . io / documentation / operators / sample . html " > ReactiveX operators documentation : Sample < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > throttleFirst ( long windowDuration , TimeUnit unit ) { } }

implementation: return throttleFirst ( windowDuration , unit , Schedulers . computation ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits only the first item emitted by the source ObservableSource during sequential
 * time windows of a specified duration , where the windows are managed by a specified Scheduler .
 * This differs from { @ link # throttleLast } in that this only tracks passage of time whereas
 * { @ link # throttleLast } ticks at scheduled intervals .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / throttleFirst . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param skipDuration
 * time to wait before emitting another item after emitting the last item
 * @ param unit
 * the unit of time of { @ code skipDuration }
 * @ param scheduler
 * the { @ link Scheduler } to use internally to manage the timers that handle timeout for each
 * event
 * @ return an Observable that performs the throttle operation
 * @ see < a href = " http : / / reactivex . io / documentation / operators / sample . html " > ReactiveX operators documentation : Sample < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > throttleFirst ( long skipDuration , TimeUnit unit , Scheduler scheduler ) { } }

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


signature:
public class Observable { /** * Returns an Observable that emits only the last item emitted by the source ObservableSource during sequential
 * time windows of a specified duration .
 * This differs from { @ link # throttleFirst } in that this ticks along at a scheduled interval whereas
 * { @ link # throttleFirst } does not tick , it just tracks passage of time .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / throttleLast . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code throttleLast } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param intervalDuration
 * duration of windows within which the last item emitted by the source ObservableSource will be
 * emitted
 * @ param unit
 * the unit of time of { @ code intervalDuration }
 * @ return an Observable that performs the throttle operation
 * @ see < a href = " http : / / reactivex . io / documentation / operators / sample . html " > ReactiveX operators documentation : Sample < / a >
 * @ see # sample ( long , TimeUnit ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > throttleLast ( long intervalDuration , TimeUnit unit ) { } }

implementation: return sample ( intervalDuration , unit ) ;


signature:
public class Observable { /** * Returns an Observable that emits only the last item emitted by the source ObservableSource during sequential
 * time windows of a specified duration , where the duration is governed by a specified Scheduler .
 * This differs from { @ link # throttleFirst } in that this ticks along at a scheduled interval whereas
 * { @ link # throttleFirst } does not tick , it just tracks passage of time .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / throttleLast . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param intervalDuration
 * duration of windows within which the last item emitted by the source ObservableSource will be
 * emitted
 * @ param unit
 * the unit of time of { @ code intervalDuration }
 * @ param scheduler
 * the { @ link Scheduler } to use internally to manage the timers that handle timeout for each
 * event
 * @ return an Observable that performs the throttle operation
 * @ see < a href = " http : / / reactivex . io / documentation / operators / sample . html " > ReactiveX operators documentation : Sample < / a >
 * @ see # sample ( long , TimeUnit , Scheduler ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > throttleLast ( long intervalDuration , TimeUnit unit , Scheduler scheduler ) { } }

implementation: return sample ( intervalDuration , unit , scheduler ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , except that it drops items emitted by the
 * source ObservableSource that are followed by newer items before a timeout value expires . The timer resets on
 * each emission ( alias to { @ link # debounce ( long , TimeUnit , Scheduler ) } ) .
 * < em > Note : < / em > If items keep being emitted by the source ObservableSource faster than the timeout then no items
 * will be emitted by the resulting ObservableSource .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / throttleWithTimeout . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code throttleWithTimeout } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timeout
 * the length of the window of time that must pass after the emission of an item from the source
 * ObservableSource in which that ObservableSource emits no items in order for the item to be emitted by the
 * resulting ObservableSource
 * @ param unit
 * the unit of time for the specified { @ code timeout }
 * @ return an Observable that filters out items from the source ObservableSource that are too quickly followed by
 * newer items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / debounce . html " > ReactiveX operators documentation : Debounce < / a >
 * @ see # debounce ( long , TimeUnit ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > throttleWithTimeout ( long timeout , TimeUnit unit ) { } }

implementation: return debounce ( timeout , unit ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , except that it drops items emitted by the
 * source ObservableSource that are followed by newer items before a timeout value expires on a specified
 * Scheduler . The timer resets on each emission ( Alias to { @ link # debounce ( long , TimeUnit , Scheduler ) } ) .
 * < em > Note : < / em > If items keep being emitted by the source ObservableSource faster than the timeout then no items
 * will be emitted by the resulting ObservableSource .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / throttleWithTimeout . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timeout
 * the length of the window of time that must pass after the emission of an item from the source
 * ObservableSource in which that ObservableSource emits no items in order for the item to be emitted by the
 * resulting ObservableSource
 * @ param unit
 * the unit of time for the specified { @ code timeout }
 * @ param scheduler
 * the { @ link Scheduler } to use internally to manage the timers that handle the timeout for each
 * item
 * @ return an Observable that filters out items from the source ObservableSource that are too quickly followed by
 * newer items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / debounce . html " > ReactiveX operators documentation : Debounce < / a >
 * @ see # debounce ( long , TimeUnit , Scheduler ) */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > throttleWithTimeout ( long timeout , TimeUnit unit , Scheduler scheduler ) { } }

implementation: return debounce ( timeout , unit , scheduler ) ;


signature:
public class Observable { /** * Returns an Observable that emits records of the time interval between consecutive items emitted by the
 * source ObservableSource .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeInterval . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code timeInterval } does not operate on any particular scheduler but uses the current time
 * from the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return an Observable that emits time interval information items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeinterval . html " > ReactiveX operators documentation : TimeInterval < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < Timed < T > > timeInterval ( ) { } }

implementation: return timeInterval ( TimeUnit . MILLISECONDS , Schedulers . computation ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits records of the time interval between consecutive items emitted by the
 * source ObservableSource , where this interval is computed on a specified Scheduler .
 * < img width = " 640 " height = " 315 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeInterval . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > The operator does not operate on any particular scheduler but uses the current time
 * from the specified { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param unit the time unit for the current time
 * @ param scheduler
 * the { @ link Scheduler } used to compute time intervals
 * @ return an Observable that emits time interval information items
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeinterval . html " > ReactiveX operators documentation : TimeInterval < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) // Supplied scheduler is only used for creating timestamps .
public final Observable < Timed < T > > timeInterval ( TimeUnit unit , Scheduler scheduler ) { } }

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


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , but notifies observers of a
 * { @ code TimeoutException } if an item emitted by the source ObservableSource doesn ' t arrive within a window of
 * time after the emission of the previous item , where that period of time is measured by an ObservableSource that
 * is a function of the previous item .
 * < img width = " 640 " height = " 400 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeout3 . png " alt = " " >
 * Note : The arrival of the first source item is never timed out .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code timeout } operates by default on the { @ code immediate } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < V >
 * the timeout value type ( ignored )
 * @ param itemTimeoutIndicator
 * a function that returns an ObservableSource for each item emitted by the source
 * ObservableSource and that determines the timeout window for the subsequent item
 * @ return an Observable that mirrors the source ObservableSource , but notifies observers of a
 * { @ code TimeoutException } if an item emitted by the source ObservableSource takes longer to arrive than
 * the time window defined by the selector for the previously emitted item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeout . html " > ReactiveX operators documentation : Timeout < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < V > Observable < T > timeout ( Function < ? super T , ? extends ObservableSource < V > > itemTimeoutIndicator ) { } }

implementation: return timeout0 ( null , itemTimeoutIndicator , null ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource , but that switches to a fallback ObservableSource if
 * an item emitted by the source ObservableSource doesn ' t arrive within a window of time after the emission of the
 * previous item , where that period of time is measured by an ObservableSource that is a function of the previous
 * item .
 * < img width = " 640 " height = " 400 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeout4 . png " alt = " " >
 * Note : The arrival of the first source item is never timed out .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code timeout } operates by default on the { @ code immediate } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < V >
 * the timeout value type ( ignored )
 * @ param itemTimeoutIndicator
 * a function that returns an ObservableSource , for each item emitted by the source ObservableSource , that
 * determines the timeout window for the subsequent item
 * @ param other
 * the fallback ObservableSource to switch to if the source ObservableSource times out
 * @ return an Observable that mirrors the source ObservableSource , but switches to mirroring a fallback ObservableSource
 * if an item emitted by the source ObservableSource takes longer to arrive than the time window defined
 * by the selector for the previously emitted item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeout . html " > ReactiveX operators documentation : Timeout < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < V > Observable < T > timeout ( Function < ? super T , ? extends ObservableSource < V > > itemTimeoutIndicator , ObservableSource < ? extends T > other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return timeout0 ( null , itemTimeoutIndicator , other ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted
 * item . If the next item isn ' t emitted within the specified timeout duration starting from its predecessor ,
 * the resulting ObservableSource terminates and notifies observers of a { @ code TimeoutException } .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeout . 1 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code timeout } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timeout
 * maximum duration between emitted items before a timeout occurs
 * @ param timeUnit
 * the unit of time that applies to the { @ code timeout } argument .
 * @ return the source ObservableSource modified to notify observers of a { @ code TimeoutException } in case of a
 * timeout
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeout . html " > ReactiveX operators documentation : Timeout < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > timeout ( long timeout , TimeUnit timeUnit ) { } }

implementation: return timeout0 ( timeout , timeUnit , null , Schedulers . computation ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted
 * item . If the next item isn ' t emitted within the specified timeout duration starting from its predecessor ,
 * the source ObservableSource is disposed and resulting ObservableSource begins instead
 * to mirror a fallback ObservableSource .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeout . 2 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code timeout } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timeout
 * maximum duration between items before a timeout occurs
 * @ param timeUnit
 * the unit of time that applies to the { @ code timeout } argument
 * @ param other
 * the fallback ObservableSource to use in case of a timeout
 * @ return the source ObservableSource modified to switch to the fallback ObservableSource in case of a timeout
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeout . html " > ReactiveX operators documentation : Timeout < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > timeout ( long timeout , TimeUnit timeUnit , ObservableSource < ? extends T > other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return timeout0 ( timeout , timeUnit , other , Schedulers . computation ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted
 * item using a specified Scheduler . If the next item isn ' t emitted within the specified timeout duration
 * starting from its predecessor , the source ObservableSource is disposed and resulting ObservableSource
 * begins instead to mirror a fallback ObservableSource .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeout . 2s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timeout
 * maximum duration between items before a timeout occurs
 * @ param timeUnit
 * the unit of time that applies to the { @ code timeout } argument
 * @ param scheduler
 * the { @ link Scheduler } to run the timeout timers on
 * @ param other
 * the ObservableSource to use as the fallback in case of a timeout
 * @ return the source ObservableSource modified so that it will switch to the fallback ObservableSource in case of a
 * timeout
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeout . html " > ReactiveX operators documentation : Timeout < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > timeout ( long timeout , TimeUnit timeUnit , Scheduler scheduler , ObservableSource < ? extends T > other ) { } }

implementation: ObjectHelper . requireNonNull ( other , "other is null" ) ; return timeout0 ( timeout , timeUnit , other , scheduler ) ;


signature:
public class Observable { /** * Returns an Observable that mirrors the source ObservableSource but applies a timeout policy for each emitted
 * item , where this policy is governed on a specified Scheduler . If the next item isn ' t emitted within the
 * specified timeout duration starting from its predecessor , the resulting ObservableSource terminates and
 * notifies observers of a { @ code TimeoutException } .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeout . 1s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timeout
 * maximum duration between items before a timeout occurs
 * @ param timeUnit
 * the unit of time that applies to the { @ code timeout } argument
 * @ param scheduler
 * the Scheduler to run the timeout timers on
 * @ return the source ObservableSource modified to notify observers of a { @ code TimeoutException } in case of a
 * timeout
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timeout . html " > ReactiveX operators documentation : Timeout < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > timeout ( long timeout , TimeUnit timeUnit , Scheduler scheduler ) { } }

implementation: return timeout0 ( timeout , timeUnit , null , scheduler ) ;


signature:
public class Observable { /** * Returns an Observable that emits each item emitted by the source ObservableSource , wrapped in a
 * { @ link Timed } object whose timestamps are provided by a specified Scheduler .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timestamp . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This operator does not operate on any particular scheduler but uses the current time
 * from the specified { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param scheduler
 * the { @ link Scheduler } to use as a time source
 * @ return an Observable that emits timestamped items from the source ObservableSource with timestamps provided by
 * the { @ code scheduler }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timestamp . html " > ReactiveX operators documentation : Timestamp < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) // Supplied scheduler is only used for creating timestamps .
public final Observable < Timed < T > > timestamp ( Scheduler scheduler ) { } }

implementation: return timestamp ( TimeUnit . MILLISECONDS , scheduler ) ;


signature:
public class Observable { /** * Returns an Observable that emits each item emitted by the source ObservableSource , wrapped in a
 * { @ link Timed } object whose timestamps are provided by a specified Scheduler .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timestamp . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This operator does not operate on any particular scheduler but uses the current time
 * from the specified { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param unit the time unit for the current time
 * @ param scheduler
 * the { @ link Scheduler } to use as a time source
 * @ return an Observable that emits timestamped items from the source ObservableSource with timestamps provided by
 * the { @ code scheduler }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / timestamp . html " > ReactiveX operators documentation : Timestamp < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) // Supplied scheduler is only used for creating timestamps .
public final Observable < Timed < T > > timestamp ( final TimeUnit unit , final Scheduler scheduler ) { } }

implementation: ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return map ( Functions . < T > timestampWith ( unit , scheduler ) ) ;


signature:
public class Observable { /** * Returns a Single that emits a single item , a list composed of all the items emitted by the
 * finite source ObservableSource .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toList . 2 . png " alt = " " >
 * Normally , an ObservableSource that returns multiple items will do so by invoking its { @ link Observer } ' s
 * { @ link Observer # onNext onNext } method for each such item . You can change this behavior , instructing the
 * ObservableSource to compose a list of all of these items and then to invoke the Observer ' s { @ code onNext }
 * function once , passing it the entire list , by calling the ObservableSource ' s { @ code toList } method prior to
 * calling its { @ link # subscribe } method .
 * Note that this operator requires the upstream to signal { @ code onComplete } for the accumulated list to
 * be emitted . Sources that are infinite and never complete will never emit anything through this
 * operator and an infinite source may lead to a fatal { @ code OutOfMemoryError } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code toList } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param capacityHint
 * the number of elements expected from the current Observable
 * @ return a Single that emits a single item : a List containing all of the items emitted by the source
 * ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX operators documentation : To < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < List < T > > toList ( final int capacityHint ) { } }

implementation: ObjectHelper . verifyPositive ( capacityHint , "capacityHint" ) ; return RxJavaPlugins . onAssembly ( new ObservableToListSingle < T , List < T > > ( this , capacityHint ) ) ;


signature:
public class Observable { /** * Returns a Single that emits a single item , a list composed of all the items emitted by the
 * finite source ObservableSource .
 * < img width = " 640 " height = " 365 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toList . o . c . png " alt = " " >
 * Normally , an ObservableSource that returns multiple items will do so by invoking its { @ link Observer } ' s
 * { @ link Observer # onNext onNext } method for each such item . You can change this behavior , instructing the
 * ObservableSource to compose a list of all of these items and then to invoke the Observer ' s { @ code onNext }
 * function once , passing it the entire list , by calling the ObservableSource ' s { @ code toList } method prior to
 * calling its { @ link # subscribe } method .
 * Note that this operator requires the upstream to signal { @ code onComplete } for the accumulated collection to
 * be emitted . Sources that are infinite and never complete will never emit anything through this
 * operator and an infinite source may lead to a fatal { @ code OutOfMemoryError } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code toList } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the subclass of a collection of Ts
 * @ param collectionSupplier
 * the Callable returning the collection ( for each individual Observer ) to be filled in
 * @ return a Single that emits a single item : a List containing all of the items emitted by the source
 * ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX operators documentation : To < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U extends Collection < ? super T > > Single < U > toList ( Callable < U > collectionSupplier ) { } }

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


signature:
public class Observable { /** * Returns a Single that emits a single HashMap that contains an ArrayList of items emitted by the
 * finite source ObservableSource keyed by a specified { @ code keySelector } function .
 * < img width = " 640 " height = " 305 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toMultiMap . 2 . png " alt = " " >
 * Note that this operator requires the upstream to signal { @ code onComplete } for the accumulated map to
 * be emitted . Sources that are infinite and never complete will never emit anything through this
 * operator and an infinite source may lead to a fatal { @ code OutOfMemoryError } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code toMultimap } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < K > the key type of the Map
 * @ param keySelector
 * the function that extracts the key from the source items to be used as key in the HashMap
 * @ return a Single that emits a single item : a HashMap that contains an ArrayList of items mapped from
 * the source ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX operators documentation : To < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < K > Single < Map < K , Collection < T > > > toMultimap ( Function < ? super T , ? extends K > keySelector ) { } }

implementation: @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) Function < ? super T , ? extends T > valueSelector = ( Function ) Functions . identity ( ) ; Callable < Map < K , Collection < T > > > mapSupplier = HashMapSupplier . asCallable ( ) ; Function < K , List < T > > collectionFactory = ArrayListSupplier . asFunction ( ) ; return toMultimap ( keySelector , valueSelector , mapSupplier , collectionFactory ) ;


signature:
public class Observable { /** * Converts the current Observable into a Flowable by applying the specified backpressure strategy .
 * Marble diagrams for the various backpressure strategies are as follows :
 * < ul >
 * < li > { @ link BackpressureStrategy # BUFFER }
 * < img width = " 640 " height = " 274 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toFlowable . o . buffer . png " alt = " " >
 * < / li >
 * < li > { @ link BackpressureStrategy # DROP }
 * < img width = " 640 " height = " 389 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toFlowable . o . drop . png " alt = " " >
 * < / li >
 * < li > { @ link BackpressureStrategy # LATEST }
 * < img width = " 640 " height = " 296 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toFlowable . o . latest . png " alt = " " >
 * < / li >
 * < li > { @ link BackpressureStrategy # ERROR }
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toFlowable . o . error . png " alt = " " >
 * < / li >
 * < li > { @ link BackpressureStrategy # MISSING }
 * < img width = " 640 " height = " 411 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toFlowable . o . missing . png " alt = " " >
 * < / li >
 * < / ul >
 * < dl >
 * < dt > < b > Backpressure : < / b > < / dt >
 * < dd > The operator applies the chosen backpressure strategy of { @ link BackpressureStrategy } enum . < / dd >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code toFlowable } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param strategy the backpressure strategy to apply
 * @ return the new Flowable instance */
@ BackpressureSupport ( BackpressureKind . SPECIAL ) @ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > toFlowable ( BackpressureStrategy strategy ) { } }

implementation: Flowable < T > f = new FlowableFromObservable < T > ( this ) ; switch ( strategy ) { case DROP : return f . onBackpressureDrop ( ) ; case LATEST : return f . onBackpressureLatest ( ) ; case MISSING : return f ; case ERROR : return RxJavaPlugins . onAssembly ( new FlowableOnBackpressureError < T > ( f ) ) ; default : return f . onBackpressureBuffer ( ) ; }


signature:
public class Observable { /** * Returns a Single that emits a list that contains the items emitted by the finite source ObservableSource , in a
 * sorted order . Each item emitted by the ObservableSource must implement { @ link Comparable } with respect to all
 * other items in the sequence .
 * < p > If any item emitted by this Observable does not implement { @ link Comparable } with respect to
 * all other items emitted by this Observable , no items will be emitted and the
 * sequence is terminated with a { @ link ClassCastException } .
 * < img width = " 640 " height = " 310 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toSortedList . 2 . png " alt = " " >
 * Note that this operator requires the upstream to signal { @ code onComplete } for the accumulated list to
 * be emitted . Sources that are infinite and never complete will never emit anything through this
 * operator and an infinite source may lead to a fatal { @ code OutOfMemoryError } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code toSortedList } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return a Single that emits a list that contains the items emitted by the source ObservableSource in
 * sorted order
 * @ see < a href = " http : / / reactivex . io / documentation / operators / to . html " > ReactiveX operators documentation : To < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < List < T > > toSortedList ( ) { } }

implementation: return toSortedList ( Functions . naturalOrder ( ) ) ;


signature:
public class Observable { /** * Modifies the source ObservableSource so that subscribers will dispose it on a specified
 * { @ link Scheduler } .
 * < img width = " 640 " height = " 452 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / unsubscribeOn . o . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param scheduler
 * the { @ link Scheduler } to perform the call to dispose ( ) of the upstream Disposable
 * @ return the source ObservableSource modified so that its dispose ( ) calls happen on the specified
 * { @ link Scheduler }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / subscribeon . html " > ReactiveX operators documentation : SubscribeOn < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > unsubscribeOn ( Scheduler scheduler ) { } }

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


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping windows , each containing { @ code count } items . When the source
 * ObservableSource completes or encounters an error , the resulting ObservableSource emits the current window and
 * propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 400 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window3 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param count
 * the maximum size of each window before it should be emitted
 * @ return an Observable that emits connected , non - overlapping windows , each containing at most
 * { @ code count } items from the source ObservableSource
 * @ throws IllegalArgumentException if either count is non - positive
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < Observable < T > > window ( long count ) { } }

implementation: return window ( count , count , bufferSize ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits windows every { @ code skip } items , each containing no more than { @ code count } items . When
 * the source ObservableSource completes or encounters an error , the resulting ObservableSource emits the current window
 * and propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 365 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window4 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param count
 * the maximum size of each window before it should be emitted
 * @ param skip
 * how many items need to be skipped before starting a new window . Note that if { @ code skip } and
 * { @ code count } are equal this is the same operation as { @ link # window ( long ) } .
 * @ param bufferSize
 * the capacity hint for the buffer in the inner windows
 * @ return an Observable that emits windows every { @ code skip } items containing at most { @ code count } items
 * from the source ObservableSource
 * @ throws IllegalArgumentException if either count or skip is non - positive
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < Observable < T > > window ( long count , long skip , int bufferSize ) { } }

implementation: ObjectHelper . verifyPositive ( count , "count" ) ; ObjectHelper . verifyPositive ( skip , "skip" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; return RxJavaPlugins . onAssembly ( new ObservableWindow < T > ( this , count , skip , bufferSize ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource starts a new window periodically , as determined by the { @ code timeskip } argument . It emits
 * each window after a fixed timespan , specified by the { @ code timespan } argument . When the source
 * ObservableSource completes or ObservableSource completes or encounters an error , the resulting ObservableSource emits the
 * current window and propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 335 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window7 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each window collects items before it should be emitted
 * @ param timeskip
 * the period of time after which a new window will be created
 * @ param unit
 * the unit of time that applies to the { @ code timespan } and { @ code timeskip } arguments
 * @ return an Observable that emits new windows periodically as a fixed timespan elapses
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < Observable < T > > window ( long timespan , long timeskip , TimeUnit unit ) { } }

implementation: return window ( timespan , timeskip , unit , Schedulers . computation ( ) , bufferSize ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource starts a new window periodically , as determined by the { @ code timeskip } argument . It emits
 * each window after a fixed timespan , specified by the { @ code timespan } argument . When the source
 * ObservableSource completes or ObservableSource completes or encounters an error , the resulting ObservableSource emits the
 * current window and propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 335 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window7 . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each window collects items before it should be emitted
 * @ param timeskip
 * the period of time after which a new window 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 window
 * @ param bufferSize
 * the capacity hint for the buffer in the inner windows
 * @ return an Observable that emits new windows periodically as a fixed timespan elapses
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < Observable < T > > window ( long timespan , long timeskip , TimeUnit unit , Scheduler scheduler , int bufferSize ) { } }

implementation: ObjectHelper . verifyPositive ( timespan , "timespan" ) ; ObjectHelper . verifyPositive ( timeskip , "timeskip" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( unit , "unit is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableWindowTimed < T > ( this , timespan , timeskip , unit , scheduler , Long . MAX_VALUE , bufferSize , false ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping windows , each of a fixed duration specified by the
 * { @ code timespan } argument . When the source ObservableSource completes or encounters an error , the resulting
 * ObservableSource emits the current window and propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 375 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window5 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } operates by default on the { @ code computation } { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each window collects items before it should be emitted and replaced with a
 * new window
 * @ param unit
 * the unit of time that applies to the { @ code timespan } argument
 * @ return an Observable that emits connected , non - overlapping windows representing items emitted by the
 * source ObservableSource during fixed , consecutive durations
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < Observable < T > > window ( long timespan , TimeUnit unit ) { } }

implementation: return window ( timespan , unit , Schedulers . computation ( ) , Long . MAX_VALUE , false ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping windows , each of a fixed duration specified by the
 * { @ code timespan } argument or a maximum size specified by the { @ code count } argument ( whichever is reached
 * first ) . When the source ObservableSource completes or encounters an error , the resulting ObservableSource emits the
 * current window and propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 370 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window6 . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each window collects items before it should be emitted and replaced with a
 * new window
 * @ param unit
 * the unit of time which applies to the { @ code timespan } argument
 * @ param count
 * the maximum size of each window before it should be emitted
 * @ param scheduler
 * the { @ link Scheduler } to use when determining the end and start of a window
 * @ return an Observable that emits connected , non - overlapping windows of items from the source ObservableSource
 * that were emitted during a fixed duration of time or when the window has reached maximum capacity
 * ( whichever occurs first )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < Observable < T > > window ( long timespan , TimeUnit unit , Scheduler scheduler , long count ) { } }

implementation: return window ( timespan , unit , scheduler , count , false ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping windows , each of a fixed duration specified by the
 * { @ code timespan } argument or a maximum size specified by the { @ code count } argument ( whichever is reached
 * first ) . When the source ObservableSource completes or encounters an error , the resulting ObservableSource emits the
 * current window and propagates the notification from the source ObservableSource .
 * < img width = " 640 " height = " 370 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window6 . s . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > You specify which { @ link Scheduler } this operator will use . < / dd >
 * < / dl >
 * @ param timespan
 * the period of time each window collects items before it should be emitted and replaced with a
 * new window
 * @ param unit
 * the unit of time which applies to the { @ code timespan } argument
 * @ param count
 * the maximum size of each window before it should be emitted
 * @ param scheduler
 * the { @ link Scheduler } to use when determining the end and start of a window
 * @ param restart
 * if true , when a window reaches the capacity limit , the timer is restarted as well
 * @ param bufferSize
 * the capacity hint for the buffer in the inner windows
 * @ return an Observable that emits connected , non - overlapping windows of items from the source ObservableSource
 * that were emitted during a fixed duration of time or when the window has reached maximum capacity
 * ( whichever occurs first )
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < Observable < T > > window ( long timespan , TimeUnit unit , Scheduler scheduler , long count , boolean restart , int bufferSize ) { } }

implementation: ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . verifyPositive ( count , "count" ) ; return RxJavaPlugins . onAssembly ( new ObservableWindowTimed < T > ( this , timespan , timespan , unit , scheduler , count , bufferSize , restart ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits non - overlapping windows of items it collects from the source ObservableSource
 * where the boundary of each window is determined by the items emitted from a specified boundary - governing
 * ObservableSource .
 * < img width = " 640 " height = " 475 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window8 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < B >
 * the window element type ( ignored )
 * @ param boundary
 * an ObservableSource whose emitted items close and open windows
 * @ return an Observable that emits non - overlapping windows of items it collects from the source ObservableSource
 * where the boundary of each window is determined by the items emitted from the { @ code boundary }
 * ObservableSource
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Observable < Observable < T > > window ( ObservableSource < B > boundary ) { } }

implementation: return window ( boundary , bufferSize ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits windows that contain those items emitted by the source ObservableSource between the time when
 * the { @ code openingIndicator } ObservableSource emits an item and when the ObservableSource returned by
 * { @ code closingIndicator } emits an item .
 * < img width = " 640 " height = " 550 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window2 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the element type of the window - opening ObservableSource
 * @ param < V > the element type of the window - closing ObservableSources
 * @ param openingIndicator
 * an ObservableSource that , when it emits an item , causes another window to be created
 * @ param closingIndicator
 * a { @ link Function } that produces an ObservableSource for every window created . When this ObservableSource
 * emits an item , the associated window is closed and emitted
 * @ return an Observable that emits windows of items emitted by the source ObservableSource that are governed by
 * the specified window - governing ObservableSources
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , V > Observable < Observable < T > > window ( ObservableSource < U > openingIndicator , Function < ? super U , ? extends ObservableSource < V > > closingIndicator ) { } }

implementation: return window ( openingIndicator , closingIndicator , bufferSize ( ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits windows that contain those items emitted by the source ObservableSource between the time when
 * the { @ code openingIndicator } ObservableSource emits an item and when the ObservableSource returned by
 * { @ code closingIndicator } emits an item .
 * < img width = " 640 " height = " 550 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window2 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U > the element type of the window - opening ObservableSource
 * @ param < V > the element type of the window - closing ObservableSources
 * @ param openingIndicator
 * an ObservableSource that , when it emits an item , causes another window to be created
 * @ param closingIndicator
 * a { @ link Function } that produces an ObservableSource for every window created . When this ObservableSource
 * emits an item , the associated window is closed and emitted
 * @ param bufferSize
 * the capacity hint for the buffer in the inner windows
 * @ return an Observable that emits windows of items emitted by the source ObservableSource that are governed by
 * the specified window - governing ObservableSources
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , V > Observable < Observable < T > > window ( ObservableSource < U > openingIndicator , Function < ? super U , ? extends ObservableSource < V > > closingIndicator , int bufferSize ) { } }

implementation: ObjectHelper . requireNonNull ( openingIndicator , "openingIndicator is null" ) ; ObjectHelper . requireNonNull ( closingIndicator , "closingIndicator is null" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; return RxJavaPlugins . onAssembly ( new ObservableWindowBoundarySelector < T , U , V > ( this , openingIndicator , closingIndicator , bufferSize ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting
 * ObservableSource emits connected , non - overlapping windows . It emits the current window and opens a new one
 * whenever the ObservableSource produced by the specified { @ code closingIndicator } emits an item .
 * < img width = " 640 " height = " 455 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window1 . png " alt = " " >
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This version of { @ code window } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < B > the element type of the boundary ObservableSource
 * @ param boundary
 * a { @ link Callable } that returns an { @ code ObservableSource } that governs the boundary between windows .
 * When the source { @ code ObservableSource } emits an item , { @ code window } emits the current window and begins
 * a new one .
 * @ param bufferSize
 * the capacity hint for the buffer in the inner windows
 * @ return an Observable that emits connected , non - overlapping windows of items from the source ObservableSource
 * whenever { @ code closingIndicator } emits an item
 * @ see < a href = " http : / / reactivex . io / documentation / operators / window . html " > ReactiveX operators documentation : Window < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < B > Observable < Observable < T > > window ( Callable < ? extends ObservableSource < B > > boundary , int bufferSize ) { } }

implementation: ObjectHelper . requireNonNull ( boundary , "boundary is null" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; return RxJavaPlugins . onAssembly ( new ObservableWindowBoundarySupplier < T , B > ( this , boundary , bufferSize ) ) ;


signature:
public class Observable { /** * Returns an Observable that emits items that are the result of applying a specified function to pairs of
 * values , one each from the source ObservableSource and a specified Iterable sequence .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / zip . i . png " alt = " " >
 * Note that the { @ code other } Iterable is evaluated as items are observed from the source ObservableSource ; it is
 * not pre - consumed . This allows you to zip infinite streams on either side .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code zipWith } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U >
 * the type of items in the { @ code other } Iterable
 * @ param < R >
 * the type of items emitted by the resulting ObservableSource
 * @ param other
 * the Iterable sequence
 * @ param zipper
 * a function that combines the pairs of items from the ObservableSource and the Iterable to generate
 * the items to be emitted by the resulting ObservableSource
 * @ return an Observable that pairs up values from the source ObservableSource and the { @ code other } Iterable
 * sequence and emits the results of { @ code zipFunction } applied to these pairs
 * @ see < a href = " http : / / reactivex . io / documentation / operators / zip . html " > ReactiveX operators documentation : Zip < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , R > Observable < R > zipWith ( Iterable < U > other , BiFunction < ? super T , ? super U , ? extends R > zipper ) { } }

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


signature:
public class Observable { /** * Returns an Observable that emits items that are the result of applying a specified function to pairs of
 * values , one each from the source ObservableSource and another specified ObservableSource .
 * < img width = " 640 " height = " 380 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / zip . png " alt = " " >
 * The operator subscribes to its sources in order they are specified and completes eagerly if
 * one of the sources is shorter than the rest while disposing 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 dispose B immediately . For example :
 * < pre > < code > range ( 1 , 5 ) . doOnComplete ( action1 ) . zipWith ( range ( 6 , 5 ) . doOnComplete ( action2 ) , ( a , b ) - & gt ; a + b ) < / code > < / pre >
 * { @ code action1 } will be called but { @ code action2 } won ' t .
 * < br > To work around this termination property ,
 * use { @ link # doOnDispose ( Action ) } as well or use { @ code using ( ) } to do cleanup in case of completion
 * or a dispose ( ) call .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > { @ code zipWith } does not operate by default on a particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ param < U >
 * the type of items emitted by the { @ code other } ObservableSource
 * @ param < R >
 * the type of items emitted by the resulting ObservableSource
 * @ param other
 * the other ObservableSource
 * @ param zipper
 * a function that combines the pairs of items from the two ObservableSources to generate the items to
 * be emitted by the resulting ObservableSource
 * @ return an Observable that pairs up values from the source ObservableSource and the { @ code other } ObservableSource
 * and emits the results of { @ code zipFunction } applied to these pairs
 * @ see < a href = " http : / / reactivex . io / documentation / operators / zip . html " > ReactiveX operators documentation : Zip < / a > */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , R > Observable < R > zipWith ( ObservableSource < ? extends U > other , BiFunction < ? super T , ? super U , ? extends R > zipper ) { } }

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


signature:
public class ObservableLastMaybe { /** * TODO fuse back to Observable */
@ Override protected void subscribeActual ( MaybeObserver < ? super T > observer ) { } }

implementation: source . subscribe ( new LastObserver < T > ( observer ) ) ;


signature:
public class ConnectableObservable { /** * Returns an { @ code Observable } that stays connected to this { @ code ConnectableObservable } as long as there
 * is at least one subscription to this { @ code ConnectableObservable } .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This { @ code refCount } overload does not operate on any particular { @ link Scheduler } . < / dd >
 * < / dl >
 * @ return an { @ link Observable }
 * @ see < a href = " http : / / reactivex . io / documentation / operators / refcount . html " > ReactiveX documentation : RefCount < / a >
 * @ see # refCount ( int )
 * @ see # refCount ( long , TimeUnit )
 * @ see # refCount ( int , long , TimeUnit ) */
@ NonNull @ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public Observable < T > refCount ( ) { } }

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


signature:
public class ConnectableObservable { /** * Connects to the upstream { @ code ConnectableObservable } if the number of subscribed
 * subscriber reaches the specified count and disconnect if all subscribers have unsubscribed .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This { @ code refCount } overload does not operate on any particular { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.14 - experimental
 * @ param subscriberCount the number of subscribers required to connect to the upstream
 * @ return the new Observable instance
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > refCount ( int subscriberCount ) { } }

implementation: return refCount ( subscriberCount , 0 , TimeUnit . NANOSECONDS , Schedulers . trampoline ( ) ) ;


signature:
public class ConnectableObservable { /** * Connects to the upstream { @ code ConnectableObservable } if the number of subscribed
 * subscriber reaches 1 and disconnect after the specified
 * timeout if all subscribers have unsubscribed .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This { @ code refCount } overload operates on the specified { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.14 - experimental
 * @ param timeout the time to wait before disconnecting after all subscribers unsubscribed
 * @ param unit the time unit of the timeout
 * @ param scheduler the target scheduler to wait on before disconnecting
 * @ return the new Observable instance
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > refCount ( long timeout , TimeUnit unit , Scheduler scheduler ) { } }

implementation: return refCount ( 1 , timeout , unit , scheduler ) ;


signature:
public class ConnectableObservable { /** * Connects to the upstream { @ code ConnectableObservable } if the number of subscribed
 * subscriber reaches the specified count and disconnect after the specified
 * timeout if all subscribers have unsubscribed .
 * < dl >
 * < dt > < b > Scheduler : < / b > < / dt >
 * < dd > This { @ code refCount } overload operates on the specified { @ link Scheduler } . < / dd >
 * < / dl >
 * < p > History : 2.1.14 - experimental
 * @ param subscriberCount the number of subscribers required to connect to the upstream
 * @ param timeout the time to wait before disconnecting after all subscribers unsubscribed
 * @ param unit the time unit of the timeout
 * @ param scheduler the target scheduler to wait on before disconnecting
 * @ return the new Observable instance
 * @ since 2.2 */
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > refCount ( int subscriberCount , long timeout , TimeUnit unit , Scheduler scheduler ) { } }

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


signature:
public class ConnectableObservable { /** * Returns an Observable that automatically connects ( at most once ) to this ConnectableObservable
 * when the specified number of Subscribers subscribe to it and calls the
 * specified callback with the Subscription associated with the established connection .
 * < img width = " 640 " height = " 348 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / autoConnect . o . png " alt = " " >
 * The connection happens after the given number of subscriptions and happens at most once
 * during the lifetime of the returned Observable . If this ConnectableObservable
 * terminates , the connection is never renewed , no matter how Observers come
 * and go . Use { @ link # refCount ( ) } to renew a connection or dispose an active
 * connection when all { @ code Observer } s have disposed their { @ code Disposable } s .
 * @ param numberOfSubscribers the number of subscribers to await before calling connect
 * on the ConnectableObservable . A non - positive value indicates
 * an immediate connection .
 * @ param connection the callback Consumer that will receive the Subscription representing the
 * established connection
 * @ return an Observable that automatically connects to this ConnectableObservable
 * when the specified number of Subscribers subscribe to it and calls the
 * specified callback with the Subscription associated with the established connection */
@ NonNull public Observable < T > autoConnect ( int numberOfSubscribers , @ NonNull Consumer < ? super Disposable > connection ) { } }

implementation: if ( numberOfSubscribers <= 0 ) { this . connect ( connection ) ; return RxJavaPlugins . onAssembly ( this ) ; } return RxJavaPlugins . onAssembly ( new ObservableAutoConnect < T > ( this , numberOfSubscribers , connection ) ) ;


signature:
public class ParallelFlowable { /** * Validates the number of subscribers and returns true if their number
 * matches the parallelism level of this ParallelFlowable .
 * @ param subscribers the array of Subscribers
 * @ return true if the number of subscribers equals to the parallelism level */
protected final boolean validate ( @ NonNull Subscriber < ? > [ ] subscribers ) { } }

implementation: int p = parallelism ( ) ; if ( subscribers . length != p ) { Throwable iae = new IllegalArgumentException ( "parallelism = " + p + ", subscribers = " + subscribers . length ) ; for ( Subscriber < ? > s : subscribers ) { EmptySubscription . error ( iae , s ) ; } return false ; } return true ;


signature:
public class ParallelFlowable { /** * Take a Publisher and prepare to consume it on multiple ' rails ' ( number of CPUs )
 * in a round - robin fashion .
 * @ param < T > the value type
 * @ param source the source Publisher
 * @ return the ParallelFlowable instance */
@ CheckReturnValue public static < T > ParallelFlowable < T > from ( @ NonNull Publisher < ? extends T > source ) { } }

implementation: return from ( source , Runtime . getRuntime ( ) . availableProcessors ( ) , Flowable . bufferSize ( ) ) ;


signature:
public class ParallelFlowable { /** * Take a Publisher and prepare to consume it on parallelism number of ' rails ' in a round - robin fashion .
 * @ param < T > the value type
 * @ param source the source Publisher
 * @ param parallelism the number of parallel rails
 * @ return the new ParallelFlowable instance */
@ CheckReturnValue public static < T > ParallelFlowable < T > from ( @ NonNull Publisher < ? extends T > source , int parallelism ) { } }

implementation: return from ( source , parallelism , Flowable . bufferSize ( ) ) ;


signature:
public class ParallelFlowable { /** * Take a Publisher and prepare to consume it on parallelism number of ' rails ' ,
 * possibly ordered and round - robin fashion and use custom prefetch amount and queue
 * for dealing with the source Publisher ' s values .
 * @ param < T > the value type
 * @ param source the source Publisher
 * @ param parallelism the number of parallel rails
 * @ param prefetch the number of values to prefetch from the source
 * the source until there is a rail ready to process it .
 * @ return the new ParallelFlowable instance */
@ CheckReturnValue @ NonNull public static < T > ParallelFlowable < T > from ( @ NonNull Publisher < ? extends T > source , int parallelism , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( source , "source" ) ; ObjectHelper . verifyPositive ( parallelism , "parallelism" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ParallelFromPublisher < T > ( source , parallelism , prefetch ) ) ;


signature:
public class ParallelFlowable { /** * Calls the specified converter function during assembly time and returns its resulting value .
 * This allows fluent conversion to any other type .
 * < p > History : 2.1.7 - experimental
 * @ param < R > the resulting object type
 * @ param converter the function that receives the current ParallelFlowable instance and returns a value
 * @ return the converted value
 * @ throws NullPointerException if converter is null
 * @ since 2.2 */
@ CheckReturnValue @ NonNull public final < R > R as ( @ NonNull ParallelFlowableConverter < T , R > converter ) { } }

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


signature:
public class ParallelFlowable { /** * Maps the source values on each ' rail ' to another value .
 * Note that the same mapper function may be called from multiple threads concurrently .
 * @ param < R > the output value type
 * @ param mapper the mapper function turning Ts into Us .
 * @ return the new ParallelFlowable instance */
@ CheckReturnValue @ NonNull public final < R > ParallelFlowable < R > map ( @ NonNull Function < ? super T , ? extends R > mapper ) { } }

implementation: ObjectHelper . requireNonNull ( mapper , "mapper" ) ; return RxJavaPlugins . onAssembly ( new ParallelMap < T , R > ( this , mapper ) ) ;


signature:
public class ParallelFlowable { /** * Maps the source values on each ' rail ' to another value and
 * handles errors based on the given { @ link ParallelFailureHandling } enumeration value .
 * Note that the same mapper function may be called from multiple threads concurrently .
 * < p > History : 2.0.8 - experimental
 * @ param < R > the output value type
 * @ param mapper the mapper function turning Ts into Us .
 * @ param errorHandler the enumeration that defines how to handle errors thrown
 * from the mapper function
 * @ return the new ParallelFlowable instance
 * @ since 2.2 */
@ CheckReturnValue @ NonNull public final < R > ParallelFlowable < R > map ( @ NonNull Function < ? super T , ? extends R > mapper , @ NonNull ParallelFailureHandling errorHandler ) { } }

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


signature:
public class ParallelFlowable { /** * Filters the source values on each ' rail ' .
 * Note that the same predicate may be called from multiple threads concurrently .
 * @ param predicate the function returning true to keep a value or false to drop a value
 * @ return the new ParallelFlowable instance */
@ CheckReturnValue public final ParallelFlowable < T > filter ( @ NonNull Predicate < ? super T > predicate ) { } }

implementation: ObjectHelper . requireNonNull ( predicate , "predicate" ) ; return RxJavaPlugins . onAssembly ( new ParallelFilter < T > ( this , predicate ) ) ;


signature:
public class ParallelFlowable { /** * Filters the source values on each ' rail ' and
 * handles errors based on the given { @ link ParallelFailureHandling } enumeration value .
 * Note that the same predicate may be called from multiple threads concurrently .
 * < p > History : 2.0.8 - experimental
 * @ param predicate the function returning true to keep a value or false to drop a value
 * @ param errorHandler the enumeration that defines how to handle errors thrown
 * from the predicate
 * @ return the new ParallelFlowable instance
 * @ since 2.2 */
@ CheckReturnValue public final ParallelFlowable < T > filter ( @ NonNull Predicate < ? super T > predicate , @ NonNull ParallelFailureHandling errorHandler ) { } }

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


signature:
public class ParallelFlowable { /** * Specifies where each ' rail ' will observe its incoming values with
 * no work - stealing and default prefetch amount .
 * This operator uses the default prefetch size returned by { @ code Flowable . bufferSize ( ) } .
 * The operator will call { @ code Scheduler . createWorker ( ) } as many
 * times as this ParallelFlowable ' s parallelism level is .
 * No assumptions are made about the Scheduler ' s parallelism level ,
 * if the Scheduler ' s parallelism level is lower than the ParallelFlowable ' s ,
 * some rails may end up on the same thread / worker .
 * This operator doesn ' t require the Scheduler to be trampolining as it
 * does its own built - in trampolining logic .
 * @ param scheduler the scheduler to use
 * @ return the new ParallelFlowable instance */
@ CheckReturnValue @ NonNull public final ParallelFlowable < T > runOn ( @ NonNull Scheduler scheduler ) { } }

implementation: return runOn ( scheduler , Flowable . bufferSize ( ) ) ;


signature:
public class ParallelFlowable { /** * Specifies where each ' rail ' will observe its incoming values with
 * possibly work - stealing and a given prefetch amount .
 * This operator uses the default prefetch size returned by { @ code Flowable . bufferSize ( ) } .
 * The operator will call { @ code Scheduler . createWorker ( ) } as many
 * times as this ParallelFlowable ' s parallelism level is .
 * No assumptions are made about the Scheduler ' s parallelism level ,
 * if the Scheduler ' s parallelism level is lower than the ParallelFlowable ' s ,
 * some rails may end up on the same thread / worker .
 * This operator doesn ' t require the Scheduler to be trampolining as it
 * does its own built - in trampolining logic .
 * @ param scheduler the scheduler to use
 * that rail ' s worker has run out of work .
 * @ param prefetch the number of values to request on each ' rail ' from the source
 * @ return the new ParallelFlowable instance */
@ CheckReturnValue @ NonNull public final ParallelFlowable < T > runOn ( @ NonNull Scheduler scheduler , int prefetch ) { } }

implementation: ObjectHelper . requireNonNull ( scheduler , "scheduler" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; return RxJavaPlugins . onAssembly ( new ParallelRunOn < T > ( this , scheduler , prefetch ) ) ;


signature:
public class ParallelFlowable { /** * Reduces all values within a ' rail ' and across ' rails ' with a reducer function into a single
 * sequential value .
 * Note that the same reducer function may be called from multiple threads concurrently .
 * @ param reducer the function to reduce two values into one .
 * @ return the new Flowable instance emitting the reduced value or empty if the ParallelFlowable was empty */
@ CheckReturnValue @ NonNull public final Flowable < T > reduce ( @ NonNull BiFunction < T , T , T > reducer ) { } }

implementation: ObjectHelper . requireNonNull ( reducer , "reducer" ) ; return RxJavaPlugins . onAssembly ( new ParallelReduceFull < T > ( this , reducer ) ) ;