src/main/java/io/reactivex/Flowable.java
@SuppressWarnings("unchecked")
    @CheckReturnValue
    @BackpressureSupport(BackpressureKind.PASS_THROUGH)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Flowable<R> compose(FlowableTransformer<? super T, ? extends R> composer) {
        return fromPublisher(((FlowableTransformer<T, R>) ObjectHelper.requireNonNull(composer, "composer is null")).apply(this));
    }
@SuppressWarnings("unchecked")
    @CheckReturnValue
    @BackpressureSupport(BackpressureKind.PASS_THROUGH)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Flowable<R> compose(FlowableTransformer<? super T, ? extends R> composer) {
        return fromPublisher(((FlowableTransformer<T, R>) ObjectHelper.requireNonNull(composer, "composer is null")).apply(this));
    }
@ SuppressWarnings ( "unchecked" ) @ CheckReturnValue @ BackpressureSupport ( BackpressureKind . PASS_THROUGH ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > compose ( FlowableTransformer < ? super T , ? extends R > composer ) { return fromPublisher ( ( ( FlowableTransformer < T , R > ) ObjectHelper . requireNonNull ( composer , "composer is null" ) ) . apply ( this ) ) ; }
Transform a Publisher by applying a particular Transformer function to it.
<p>
This method operates on the Publisher itself whereas {@link #lift} operates on the Publisher's
Subscribers or Subscribers.
<p>
If the operator you are creating is designed to act on the individual items emitted by a source
Publisher, use {@link #lift}. If your operator is designed to transform the source Publisher as a whole
(for instance, by applying a particular set of existing RxJava operators to it) use {@code compose}.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator itself doesn't interfere with the backpressure behavior which only depends
on what kind of {@code Publisher} the transformer returns.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code compose} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

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