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