src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> singleOrError() {
        return RxJavaPlugins.onAssembly(new FlowableSingleSingle<T>(this, null));
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> singleOrError() {
        return RxJavaPlugins.onAssembly(new FlowableSingleSingle<T>(this, null));
    }
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < T > singleOrError ( ) { return RxJavaPlugins . onAssembly ( new FlowableSingleSingle < T > ( this , null ) ) ; }
Returns a Single that emits the single item emitted by this Flowable, if this Flowable
emits only a single item, otherwise
if this Flowable completes without emitting any items a {@link NoSuchElementException} will be signaled and
if this Flowable emits more than one item, an {@code IllegalArgumentException} will be signaled.
<p>
<img width="640" height="205" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/singleOrError.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator honors backpressure from downstream and consumes the source {@code Publisher} in an
unbounded manner (i.e., without applying backpressure).</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code singleOrError} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@return the new Single instance
@see <a href="http://reactivex.io/documentation/operators/first.html">ReactiveX operators documentation: First</a>
Returns a Single that emits the single item emitted by this Flowable if this Flowable emits only a single item otherwise if this Flowable completes without emitting any items a { @link NoSuchElementException } will be signaled and if this Flowable emits more than one item an { @code IllegalArgumentException } will be signaled . <p > <img width = 640 height = 205 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / singleOrError . png alt = > <dl > <dt > <b > Backpressure : < / b > < / dt > <dd > The operator honors backpressure from downstream and consumes the source { @code Publisher } in an unbounded manner ( i . e . without applying backpressure ) . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code singleOrError } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >