src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Future<T> toFuture() {
        return subscribeWith(new FutureObserver<T>());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Future<T> toFuture() {
        return subscribeWith(new FutureObserver<T>());
    }
Returns a {@link Future} representing the only value emitted by this {@code Observable}.
<p>
<img width="640" height="312" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/toFuture.o.png" alt="">
<p>
If the {@link Observable} emits more than one item, {@link java.util.concurrent.Future} will receive an
{@link java.lang.IndexOutOfBoundsException}. If the {@link Observable} is empty, {@link java.util.concurrent.Future}
will receive an {@link java.util.NoSuchElementException}. The {@code Observable} source has to terminate in order
for the returned {@code Future} to terminate as well.
<p>
If the {@code Observable} may emit more than one item, use {@code Observable.toList().toFuture()}.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code toFuture} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@return a {@link Future} that expects a single item to be emitted by this {@code Observable}
@see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX documentation: To</a>