public class BlockingOperatorToFuture
extends java.lang.Object
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 and Description |
|---|
BlockingOperatorToFuture() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.concurrent.Future<T> |
toFuture(Observable<? extends T> that)
Returns a Future that expects a single item from the observable.
|
public static <T> java.util.concurrent.Future<T> toFuture(Observable<? extends T> that)
T - the type of source.that - an observable sequence to get a Future for.