Single<Integer> single = Flowable.range(1, 10).reduce((a, b) -> a + b); Flowable<Integer> flowable = single.toFlowable();The
Single.toFlowable() will check for this interface and call the fuseToFlowable()
to return a Flowable which could be the Flowable-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 Flowable |
| fuseToFlowable | back to summary |
|---|---|
| public Flowable Returns a (direct) Flowable for the operator. The implementation should handle the necessary RxJavaPlugins wrapping.
| |