Interface FuseToFlowable<T>
-
- Type Parameters:
T- the value type
- All Known Implementing Classes:
FlowableAllSingle,FlowableAnySingle,FlowableCollectSingle,FlowableCollectWithCollectorSingle,FlowableCountSingle,FlowableElementAtMaybe,FlowableElementAtSingle,FlowableFlatMapCompletableCompletable,FlowableIgnoreElementsCompletable,FlowableReduceMaybe,FlowableSequenceEqualSingle,FlowableSingleMaybe,FlowableSingleSingle,FlowableToListSingle
public interface FuseToFlowable<@NonNull T>Interface indicating a operator implementation can be macro-fused back to Flowable in case the operator goes from Flowable to some other reactive type and then the sequence calls for toFlowable again:
TheSingle<Integer> single = Flowable.range(1, 10).reduce((a, b) -> a + b); Flowable<Integer> flowable = single.toFlowable();Single.toFlowable()will check for this interface and call thefuseToFlowable()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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull Flowable<T>fuseToFlowable()Returns a (direct) Flowable for the operator.
-