T
- the value typepublic interface FuseToObservable<T>
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 |
---|---|
Observable<T> |
fuseToObservable()
Returns a (direct) Observable for the operator.
|
Observable<T> fuseToObservable()
The implementation should handle the necessary RxJavaPlugins wrapping.
Copyright © 2019. All rights reserved.