src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.SPECIAL) // take may trigger UNBOUNDED_IN
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> first(T defaultItem) {
        return elementAt(0, defaultItem);
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.SPECIAL) // take may trigger UNBOUNDED_IN
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> first(T defaultItem) {
        return elementAt(0, defaultItem);
    }
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . SPECIAL ) // take may trigger UNBOUNDED_IN @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < T > first ( T defaultItem ) { return elementAt ( 0 , defaultItem ) ; }
Returns a Single that emits only the very first item emitted by this Flowable, or a default
item if this Flowable completes without emitting anything.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/first.s.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 first} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param defaultItem
the default item to emit if the source Publisher doesn't emit anything
@return a Single that emits only the very first item from the source, or a default item if the
source Publisher completes without emitting any items
@see <a href="http://reactivex.io/documentation/operators/first.html">ReactiveX operators documentation: First</a>
Returns a Single that emits only the very first item emitted by this Flowable or a default item if this Flowable completes without emitting anything . <p > <img width = 640 height = 305 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / first . s . 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 first } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >