Package rx.internal.operators
Class BlockingOperatorToFuture
- java.lang.Object
-
- rx.internal.operators.BlockingOperatorToFuture
-
public final class BlockingOperatorToFuture extends java.lang.Object
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 Modifier Constructor Description private
BlockingOperatorToFuture()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.concurrent.Future<T>
toFuture(Observable<? extends T> that)
Returns a Future that expects a single item from the observable.
-
-
-
Method Detail
-
toFuture
public static <T> java.util.concurrent.Future<T> toFuture(Observable<? extends T> that)
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
-
-