@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Flowable<R> concatMap(Function<? super T, ? extends Publisher<? extends R>> mapper, int prefetch) {
        ObjectHelper.requireNonNull(mapper, "mapper is null");
        ObjectHelper.verifyPositive(prefetch, "prefetch");
        if (this instanceof ScalarCallable) {
            @SuppressWarnings("unchecked")
            T v = ((ScalarCallable<T>)this).call();
            if (v == null) {
                return empty();
            }
            return FlowableScalarXMap.scalarXMap(v, mapper);
        }
        return RxJavaPlugins.onAssembly(new FlowableConcatMap<T, R>(this, mapper, prefetch, ErrorMode.IMMEDIATE));
    }
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Flowable < R > concatMap ( Function < ? super T , ? extends Publisher < ? extends R > > mapper , int prefetch ) { ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . verifyPositive ( prefetch , "prefetch" ) ; if ( this instanceof ScalarCallable ) { @ SuppressWarnings ( "unchecked" ) T v = ( ( ScalarCallable < T > ) this ) . call ( ) ; if ( v == null ) { return empty ( ) ; } return FlowableScalarXMap . scalarXMap ( v , mapper ) ; } return RxJavaPlugins . onAssembly ( new FlowableConcatMap < T , R > ( this , mapper , prefetch , ErrorMode . IMMEDIATE ) ) ; }
Returns a new Flowable that emits items resulting from applying a function that you supply to each item
emitted by the source Publisher, where that function returns a Publisher, and then emitting the items
that result from concatenating those resulting Publishers.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/concatMap.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator honors backpressure from downstream. Both this and the inner {@code Publisher}s are
expected to honor backpressure as well. If the source {@code Publisher} violates the rule, the operator will
signal a {@code MissingBackpressureException}. If any of the inner {@code Publisher}s doesn't honor
backpressure, that <em>may</em> throw an {@code IllegalStateException} when that
{@code Publisher} completes.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code concatMap} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <R> the type of the inner Publisher sources and thus the output type
@param mapper
a function that, when applied to an item emitted by the source Publisher, returns a
Publisher
@param prefetch
the number of elements to prefetch from the current Flowable
@return a Flowable that emits the result of applying the transformation function to each item emitted
by the source Publisher and concatenating the Publishers obtained from this transformation
@see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>