T
- the value typepublic interface FuseToFlowable<T>
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 |
---|---|
Flowable<T> |
fuseToFlowable()
Returns a (direct) Flowable for the operator.
|
Copyright © 2019. All rights reserved.