src/main/java/io/reactivex/Observable.java
@SuppressWarnings("unchecked")
    @CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Observable<R> compose(ObservableTransformer<? super T, ? extends R> composer) {
        return wrap(((ObservableTransformer<T, R>) ObjectHelper.requireNonNull(composer, "composer is null")).apply(this));
    }
@SuppressWarnings("unchecked")
    @CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Observable<R> compose(ObservableTransformer<? super T, ? extends R> composer) {
        return wrap(((ObservableTransformer<T, R>) ObjectHelper.requireNonNull(composer, "composer is null")).apply(this));
    }
@ SuppressWarnings ( "unchecked" ) @ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > compose ( ObservableTransformer < ? super T , ? extends R > composer ) { return wrap ( ( ( ObservableTransformer < T , R > ) ObjectHelper . requireNonNull ( composer , "composer is null" ) ) . apply ( this ) ) ; }
Transform an ObservableSource by applying a particular Transformer function to it.
<p>
This method operates on the ObservableSource itself whereas {@link #lift} operates on the ObservableSource's
Observers.
<p>
If the operator you are creating is designed to act on the individual items emitted by a source
ObservableSource, use {@link #lift}. If your operator is designed to transform the source ObservableSource as a whole
(for instance, by applying a particular set of existing RxJava operators to it) use {@code compose}.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code compose} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

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