public static final <T> Transformer<T, T> orderedMergeWith(final Observable<T> other,
            final Comparator<? super T> comparator) {
        @SuppressWarnings("unchecked")
        Collection<Observable<T>> collection = Arrays.asList(other);
        return orderedMergeWith(collection, comparator);
    }
public static final < T > Transformer < T , T > orderedMergeWith ( final Observable < T > other , final Comparator < ? super T > comparator ) { @ SuppressWarnings ( "unchecked" ) Collection < Observable < T > > collection = Arrays . asList ( other ) ; return orderedMergeWith ( collection , comparator ) ; }
<p>
Returns the source {@link Observable} merged with the <code>other</code>
observable using the given {@link Comparator} for order. A precondition
is that the source and other are already ordered. This transformer
supports backpressure and its inputs must also support backpressure.

<p>
<img src=
"https://github.com/davidmoten/rxjava-extras/blob/master/src/docs/orderedMerge.png?raw=true"
alt="marble diagram">

@param other
the other already ordered observable
@param comparator
the ordering to use
@param <T>
the generic type of the objects being compared
@return merged and ordered observable