src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, R> Flowable<R> flatMap(final Function<? super T, ? extends Publisher<? extends U>> mapper,
            final BiFunction<? super T, ? super U, ? extends R> combiner, boolean delayErrors, int maxConcurrency, int bufferSize) {
        ObjectHelper.requireNonNull(mapper, "mapper is null");
        ObjectHelper.requireNonNull(combiner, "combiner is null");
        ObjectHelper.verifyPositive(maxConcurrency, "maxConcurrency");
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        return flatMap(FlowableInternalHelper.flatMapWithCombiner(mapper, combiner), delayErrors, maxConcurrency, bufferSize);
    }
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, R> Flowable<R> flatMap(final Function<? super T, ? extends Publisher<? extends U>> mapper,
            final BiFunction<? super T, ? super U, ? extends R> combiner, boolean delayErrors, int maxConcurrency, int bufferSize) {
        ObjectHelper.requireNonNull(mapper, "mapper is null");
        ObjectHelper.requireNonNull(combiner, "combiner is null");
        ObjectHelper.verifyPositive(maxConcurrency, "maxConcurrency");
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        return flatMap(FlowableInternalHelper.flatMapWithCombiner(mapper, combiner), delayErrors, maxConcurrency, bufferSize);
    }
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , R > Flowable < R > flatMap ( final Function < ? super T , ? extends Publisher < ? extends U > > mapper , final BiFunction < ? super T , ? super U , ? extends R > combiner , boolean delayErrors , int maxConcurrency , int bufferSize ) { ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . requireNonNull ( combiner , "combiner is null" ) ; ObjectHelper . verifyPositive ( maxConcurrency , "maxConcurrency" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; return flatMap ( FlowableInternalHelper . flatMapWithCombiner ( mapper , combiner ) , delayErrors , maxConcurrency , bufferSize ) ; }
Returns a Flowable that emits the results of a specified function to the pair of values emitted by the
source Publisher and a specified collection Publisher, while limiting the maximum number of concurrent
subscriptions to these Publishers.
<!-- <p> -->
<!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
The inner {@code Publisher}s are expected to honor backpressure; if violated,
the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <U>
the type of items emitted by the inner Publishers
@param <R>
the type of items emitted by the combiner function
@param mapper
a function that returns a Publisher for each item emitted by the source Publisher
@param combiner
a function that combines one item emitted by each of the source and collection Publishers and
returns an item to be emitted by the resulting Publisher
@param maxConcurrency
the maximum number of Publishers that may be subscribed to concurrently
@param delayErrors
if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate
if false, the first one signaling an exception will terminate the whole sequence immediately
@param bufferSize
the number of elements to prefetch from the inner Publishers.
@return a Flowable that emits the results of applying a function to a pair of values emitted by the
source Publisher and the collection Publisher
@see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
@since 2.0
Returns a Flowable that emits the results of a specified function to the pair of values emitted by the source Publisher and a specified collection Publisher while limiting the maximum number of concurrent subscriptions to these Publishers . <! -- <p > -- > <! -- <img width = 640 height = 390 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / mergeMap . r . png alt = > -- > <dl > <dt > <b > Backpressure : < / b > < / dt > <dd > The operator honors backpressure from downstream . The upstream Flowable is consumed in a bounded manner ( up to { @code maxConcurrency } outstanding request amount for items ) . The inner { @code Publisher } s are expected to honor backpressure ; if violated the operator <em > may< / em > signal { @code MissingBackpressureException } . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code flatMap } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >