Top Description Methods
io.reactivex.internal.fuseable

public Interface FuseToObservable<T>

Known Direct Implementers
io.reactivex.internal.operators.observable.ObservableAllSingle, io.reactivex.internal.operators.observable.ObservableAnySingle, io.reactivex.internal.operators.observable.ObservableSequenceEqualSingle, io.reactivex.internal.operators.observable.ObservableToListSingle, io.reactivex.internal.operators.observable.ObservableElementAtMaybe, io.reactivex.internal.operators.observable.ObservableElementAtSingle, io.reactivex.internal.operators.observable.ObservableFlatMapCompletableCompletable, io.reactivex.internal.operators.observable.ObservableIgnoreElementsCompletable, io.reactivex.internal.operators.observable.ObservableCollectSingle, io.reactivex.internal.operators.observable.ObservableCountSingle
Type Parameters
<T>
the value type
Imports
io.reactivex.Observable

Interface indicating a operator implementation can be macro-fused back to Observable in case the operator goes from Observable to some other reactive type and then the sequence calls for toObservable again:
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.

Method Summary

Modifier and TypeMethod and Description
public Observable<T>

Returns:

the Observable instance
fuseToObservable
()

Returns a (direct) Observable for the operator.

Method Detail

fuseToObservableback to summary
public Observable<T> fuseToObservable()

Returns a (direct) Observable for the operator.

The implementation should handle the necessary RxJavaPlugins wrapping.

Returns:Observable<T>

the Observable instance