src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final T blockingSingle(T defaultItem) {
        return single(defaultItem).blockingGet();
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final T blockingSingle(T defaultItem) {
        return single(defaultItem).blockingGet();
    }
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . UNBOUNDED_IN ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final T blockingSingle ( T defaultItem ) { return single ( defaultItem ) . blockingGet ( ) ; }
If this {@code Flowable} completes after emitting a single item, return that item; if it emits
more than one item, throw an {@code IllegalArgumentException}; if it emits no items, return a default
value.
<p>
<img width="640" height="315" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/B.singleOrDefault.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator consumes the source {@code Flowable} in an unbounded manner
(i.e., no backpressure applied to it).</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code blockingSingle} does not operate by default on a particular {@link Scheduler}.</dd>
<dt><b>Error handling:</b></dt>
<dd>If the source signals an error, the operator wraps a checked {@link Exception}
into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
{@link Error}s are rethrown as they are.</dd>
</dl>

@param defaultItem
a default value to return if this {@code Flowable} emits no items
@return the single item emitted by this {@code Flowable}, or the default value if it emits no
items
@see <a href="http://reactivex.io/documentation/operators/first.html">ReactiveX documentation: First</a>
If this { @code Flowable } completes after emitting a single item return that item ; if it emits more than one item throw an { @code IllegalArgumentException } ; if it emits no items return a default value . <p > <img width = 640 height = 315 src = https : // github . com / ReactiveX / RxJava / wiki / images / rx - operators / B . singleOrDefault . png alt = > <dl > <dt > <b > Backpressure : < / b > < / dt > <dd > The operator consumes the source { @code Flowable } in an unbounded manner ( i . e . no backpressure applied to it ) . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code blockingSingle } does not operate by default on a particular { @link Scheduler } . < / dd > <dt > <b > Error handling : < / b > < / dt > <dd > If the source signals an error the operator wraps a checked { @link Exception } into { @link RuntimeException } and throws that . Otherwise { @code RuntimeException } s and { @link Error } s are rethrown as they are . < / dd > < / dl >