src/main/java/io/reactivex/Maybe.java
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, R> Maybe<R> flatMap(Function<? super T, ? extends MaybeSource<? extends U>> mapper,
            BiFunction<? super T, ? super U, ? extends R> resultSelector) {
        ObjectHelper.requireNonNull(mapper, "mapper is null");
        ObjectHelper.requireNonNull(resultSelector, "resultSelector is null");
        return RxJavaPlugins.onAssembly(new MaybeFlatMapBiSelector<T, U, R>(this, mapper, resultSelector));
    }
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, R> Maybe<R> flatMap(Function<? super T, ? extends MaybeSource<? extends U>> mapper,
            BiFunction<? super T, ? super U, ? extends R> resultSelector) {
        ObjectHelper.requireNonNull(mapper, "mapper is null");
        ObjectHelper.requireNonNull(resultSelector, "resultSelector is null");
        return RxJavaPlugins.onAssembly(new MaybeFlatMapBiSelector<T, U, R>(this, mapper, resultSelector));
    }
@ CheckReturnValue @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , R > Maybe < R > flatMap ( Function < ? super T , ? extends MaybeSource < ? extends U > > mapper , BiFunction < ? super T , ? super U , ? extends R > resultSelector ) { ObjectHelper . requireNonNull ( mapper , "mapper is null" ) ; ObjectHelper . requireNonNull ( resultSelector , "resultSelector is null" ) ; return RxJavaPlugins . onAssembly ( new MaybeFlatMapBiSelector < T , U , R > ( this , mapper , resultSelector ) ) ; }
Returns a Maybe that emits the results of a specified function to the pair of values emitted by the
source Maybe and a specified mapped MaybeSource.
<p>
<img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt="">
<dl>
<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 MaybeSource returned by the {@code mapper} function
@param <R>
the type of items emitted by the resulting Maybe
@param mapper
a function that returns a MaybeSource for the item emitted by the source Maybe
@param resultSelector
a function that combines one item emitted by each of the source and collection MaybeSource and
returns an item to be emitted by the resulting MaybeSource
@return the new Maybe instance
@see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
Returns a Maybe that emits the results of a specified function to the pair of values emitted by the source Maybe and a specified mapped MaybeSource . <p > <img width = 640 height = 390 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / mergeMap . r . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code flatMap } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >