src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> elementAt(long index, T defaultItem) {
        if (index < 0) {
            throw new IndexOutOfBoundsException("index >= 0 required but it was " + index);
        }
        ObjectHelper.requireNonNull(defaultItem, "defaultItem is null");
        return RxJavaPlugins.onAssembly(new ObservableElementAtSingle<T>(this, index, defaultItem));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> elementAt(long index, T defaultItem) {
        if (index < 0) {
            throw new IndexOutOfBoundsException("index >= 0 required but it was " + index);
        }
        ObjectHelper.requireNonNull(defaultItem, "defaultItem is null");
        return RxJavaPlugins.onAssembly(new ObservableElementAtSingle<T>(this, index, defaultItem));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < T > elementAt ( long index , T defaultItem ) { if ( index < 0 ) { throw new IndexOutOfBoundsException ( "index >= 0 required but it was " + index ) ; } ObjectHelper . requireNonNull ( defaultItem , "defaultItem is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableElementAtSingle < T > ( this , index , defaultItem ) ) ; }
Returns a Single that emits the item found at a specified index in a sequence of emissions from
this Observable, or a default item if that index is out of range.
<p>
<img width="640" height="353" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/elementAtDefault.o.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code elementAt} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param index
the zero-based index of the item to retrieve
@param defaultItem
the default item
@return a Single that emits the item at the specified position in the sequence emitted by the source
ObservableSource, or the default item if that index is outside the bounds of the source sequence
@throws IndexOutOfBoundsException
if {@code index} is less than 0
@see <a href="http://reactivex.io/documentation/operators/elementat.html">ReactiveX operators documentation: ElementAt</a>
Returns a Single that emits the item found at a specified index in a sequence of emissions from this Observable or a default item if that index is out of range . <p > <img width = 640 height = 353 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / elementAtDefault . o . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code elementAt } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >