Top Description Methods
io.reactivex.rxjava3.internal.fuseable

public Interface FuseToFlowable<T>

Known Direct Implementers
io.reactivex.rxjava3.internal.jdk8.FlowableCollectWithCollectorSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableAllSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableAnySingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableSequenceEqualSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableSingleMaybe, io.reactivex.rxjava3.internal.operators.flowable.FlowableSingleSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe, io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapCompletableCompletable, io.reactivex.rxjava3.internal.operators.flowable.FlowableToListSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableIgnoreElementsCompletable, io.reactivex.rxjava3.internal.operators.flowable.FlowableReduceMaybe, io.reactivex.rxjava3.internal.operators.flowable.FlowableCollectSingle, io.reactivex.rxjava3.internal.operators.flowable.FlowableCountSingle
Type Parameters
<T>
the value type
Imports
io.reactivex.rxjava3.annotations.NonNull, io.reactivex.rxjava3.core.Flowable

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:
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.

Method Summary

Modifier and TypeMethod and Description
public @NonNull Flowable<T>

Returns:

the Flowable instance
fuseToFlowable
()

Returns a (direct) Flowable for the operator.

Method Detail

fuseToFlowableback to summary
public @NonNull Flowable<T> fuseToFlowable()

Returns a (direct) Flowable for the operator.

The implementation should handle the necessary RxJavaPlugins wrapping.

Returns:@NonNull Flowable<T>

the Flowable instance

Annotations
@NonNull