Single<Integer> single = Observable.range(1, 10).reduce((a, b) -> a + b); Observable<Integer> observable = single.toObservable();The
Single.toObservable() will check for this interface and call the fuseToObservable()
to return an Observable which could be the Observable-specific implementation of reduce(BiFunction).
This causes a slight overhead in assembly time (1 instanceof check, 1 operator allocation and 1 dropped operator) but does not incur the conversion overhead at runtime.
| Modifier and Type | Method and Description |
|---|---|
| public Observable |
| fuseToObservable | back to summary |
|---|---|
| public Observable Returns a (direct) Observable for the operator. The implementation should handle the necessary RxJavaPlugins wrapping.
| |