src/main/java/io/reactivex/Single.java
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> doOnSuccess(final Consumer<? super T> onSuccess) {
        ObjectHelper.requireNonNull(onSuccess, "onSuccess is null");
        return RxJavaPlugins.onAssembly(new SingleDoOnSuccess<T>(this, onSuccess));
    }
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> doOnSuccess(final Consumer<? super T> onSuccess) {
        ObjectHelper.requireNonNull(onSuccess, "onSuccess is null");
        return RxJavaPlugins.onAssembly(new SingleDoOnSuccess<T>(this, onSuccess));
    }
@ CheckReturnValue @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < T > doOnSuccess ( final Consumer < ? super T > onSuccess ) { ObjectHelper . requireNonNull ( onSuccess , "onSuccess is null" ) ; return RxJavaPlugins . onAssembly ( new SingleDoOnSuccess < T > ( this , onSuccess ) ) ; }
Calls the shared consumer with the success value sent via onSuccess for each
SingleObserver that subscribes to the current Single.
<p>
<img width="640" height="347" src="https://raw.githubusercontent.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.doOnSuccess.2.png" alt="">
</p>
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code doOnSuccess} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
@param onSuccess the consumer called with the success value of onSuccess
@return the new Single instance
@since 2.0
Calls the shared consumer with the success value sent via onSuccess for each SingleObserver that subscribes to the current Single . <p > <img width = 640 height = 347 src = https : // raw . githubusercontent . com / wiki / ReactiveX / RxJava / images / rx - operators / Single . doOnSuccess . 2 . png alt = > < / p > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > {