@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public static <T> Observable<T> merge(ObservableSource<? extends ObservableSource<? extends T>> sources) {
        ObjectHelper.requireNonNull(sources, "sources is null");
        return RxJavaPlugins.onAssembly(new ObservableFlatMap(sources, Functions.identity(), false, Integer.MAX_VALUE, bufferSize()));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public static <T> Observable<T> merge(ObservableSource<? extends ObservableSource<? extends T>> sources) {
        ObjectHelper.requireNonNull(sources, "sources is null");
        return RxJavaPlugins.onAssembly(new ObservableFlatMap(sources, Functions.identity(), false, Integer.MAX_VALUE, bufferSize()));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static < T > Observable < T > merge ( ObservableSource < ? extends ObservableSource < ? extends T > > sources ) { ObjectHelper . requireNonNull ( sources , "sources is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableFlatMap ( sources , Functions . identity ( ) , false , Integer . MAX_VALUE , bufferSize ( ) ) ) ; }
Flattens an ObservableSource that emits ObservableSources into a single ObservableSource that emits the items emitted by
those ObservableSources, without any transformation.
<p>
<img width="640" height="370" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/merge.oo.png" alt="">
<p>
You can combine the items emitted by multiple ObservableSources so that they appear as a single ObservableSource, by
using the {@code merge} method.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
<dt><b>Error handling:</b></dt>
<dd>If any of the source {@code ObservableSource}s signal a {@code Throwable} via {@code onError}, the resulting
{@code Observable} terminates with that {@code Throwable} and all other source {@code ObservableSource}s are disposed.
If more than one {@code ObservableSource} signals an error, the resulting {@code Observable} may terminate with the
first one's error or, depending on the concurrency of the sources, may terminate with a
{@code CompositeException} containing two or more of the various error signals.
{@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
{@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
signaled by source(s) after the returned {@code Observable} has been disposed or terminated with a
(composite) error will be sent to the same global error handler.
Use {@link #mergeDelayError(ObservableSource)} to merge sources and terminate only when all source {@code ObservableSource}s
have completed or failed with an error.
</dd>
</dl>

@param <T> the common element base type
@param sources
an ObservableSource that emits ObservableSources
@return an Observable that emits items that are the result of flattening the ObservableSources emitted by the
{@code source} ObservableSource
@see <a href="http://reactivex.io/documentation/operators/merge.html">ReactiveX operators documentation: Merge</a>
@see #mergeDelayError(ObservableSource)
Flattens an ObservableSource that emits ObservableSources into a single ObservableSource that emits the items emitted by those ObservableSources without any transformation . <p > <img width = 640 height = 370 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / merge . oo . png alt = > <p > You can combine the items emitted by multiple ObservableSources so that they appear as a single ObservableSource by using the { @code merge } method . <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code merge } does not operate by default on a particular { @link Scheduler } . < / dd > <dt > <b > Error handling : < / b > < / dt > <dd > If any of the source { @code ObservableSource } s signal a { @code Throwable } via { @code onError } the resulting { @code Observable } terminates with that { @code Throwable } and all other source { @code ObservableSource } s are disposed . If more than one { @code ObservableSource } signals an error the resulting { @code Observable } may terminate with the first one s error or depending on the concurrency of the sources may terminate with a { @code CompositeException } containing two or more of the various error signals . { @code Throwable } s that didn t make into the composite will be sent ( individually ) to the global error handler via { @link RxJavaPlugins#onError ( Throwable ) } method as { @code UndeliverableException } errors . Similarly { @code Throwable } s signaled by source ( s ) after the returned { @code Observable } has been disposed or terminated with a ( composite ) error will be sent to the same global error handler . Use { @link #mergeDelayError ( ObservableSource ) } to merge sources and terminate only when all source { @code ObservableSource } s have completed or failed with an error . < / dd > < / dl >