Package rx.internal.operators
Class BlockingOperatorToFuture
java.lang.Object
rx.internal.operators.BlockingOperatorToFuture
Returns a Future representing the single value emitted by an Observable.
The toFuture operation throws an exception if the Observable emits more than one item. If the
Observable may emit more than item, use toList().toFuture()
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Future
<T> toFuture
(Observable<? extends T> that) Returns a Future that expects a single item from the observable.
-
Constructor Details
-
BlockingOperatorToFuture
private BlockingOperatorToFuture()
-
-
Method Details
-
toFuture
Returns a Future that expects a single item from the observable.- Type Parameters:
T
- the type of source.- Parameters:
that
- an observable sequence to get a Future for.- Returns:
- the Future to retrieve a single elements from an Observable
-