src/main/java/io/reactivex/Single.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <E extends SingleObserver<? super T>> E subscribeWith(E observer) {
        subscribe(observer);
        return observer;
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <E extends SingleObserver<? super T>> E subscribeWith(E observer) {
        subscribe(observer);
        return observer;
    }
Subscribes a given SingleObserver (subclass) to this Single and returns the given
SingleObserver as is.
<p>Usage example:
<pre><code>
Single&lt;Integer&gt; source = Single.just(1);
CompositeDisposable composite = new CompositeDisposable();

DisposableSingleObserver&lt;Integer&gt; ds = new DisposableSingleObserver&lt;&gt;() {
// ...
};

composite.add(source.subscribeWith(ds));
</code></pre>
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code subscribeWith} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
@param <E> the type of the SingleObserver to use and return
@param observer the SingleObserver (subclass) to use and return, not null
@return the input {@code observer}
@throws NullPointerException if {@code observer} is null
@since 2.0