Top Description Constructors Methods
rx.internal.operators

public final Class BlockingOperatorToFuture

extends Object
Class Inheritance
Imports
java.util.concurrent.*, java.util.concurrent.atomic.AtomicReference, rx.*

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

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
the type of source.
T
>
Future<T>

Returns:

the Future to retrieve a single elements from an Observable
toFuture
(Observable<? extends T>
an observable sequence to get a Future for.
that
)

Returns a Future that expects a single item from the observable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BlockingOperatorToFutureback to summary
private BlockingOperatorToFuture()

Method Detail

toFutureback to summary
public static <T> Future<T> toFuture(Observable<? extends T> that)

Returns a Future that expects a single item from the observable.

Parameters
<T>
the type of source.
that:Observable<? extends T>

an observable sequence to get a Future for.

Returns:Future<T>

the Future to retrieve a single elements from an Observable