src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Observable<R> flatMap(Function<? super T, ? extends ObservableSource<? extends R>> mapper, boolean delayErrors) {
        return flatMap(mapper, delayErrors, Integer.MAX_VALUE);
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Observable<R> flatMap(Function<? super T, ? extends ObservableSource<? extends R>> mapper, boolean delayErrors) {
        return flatMap(mapper, delayErrors, Integer.MAX_VALUE);
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final < R > Observable < R > flatMap ( Function < ? super T , ? extends ObservableSource < ? extends R > > mapper , boolean delayErrors ) { return flatMap ( mapper , delayErrors , Integer . MAX_VALUE ) ; }
Returns an Observable that emits items based on applying a function that you supply to each item emitted
by the source ObservableSource, where that function returns an ObservableSource, and then merging those resulting
ObservableSources and emitting the results of this merger.
<p>
<img width="640" height="356" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMapDelayError.o.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <R> the value type of the inner ObservableSources and the output type
@param mapper
a function that, when applied to an item emitted by the source ObservableSource, returns an
ObservableSource
@param delayErrors
if true, exceptions from the current Observable and all inner ObservableSources are delayed until all of them terminate
if false, the first one signalling an exception will terminate the whole sequence immediately
@return an Observable that emits the result of applying the transformation function to each item emitted
by the source ObservableSource and merging the results of the ObservableSources obtained from this
transformation
@see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source ObservableSource where that function returns an ObservableSource and then merging those resulting ObservableSources and emitting the results of this merger . <p > <img width = 640 height = 356 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / flatMapDelayError . o . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code flatMap } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >