Top Description Methods
io.reactivex.internal.fuseable

public Interface FuseToMaybe<T>

Known Direct Implementers
io.reactivex.internal.operators.maybe.MaybeIgnoreElementCompletable, io.reactivex.internal.operators.maybe.MaybeIsEmptySingle
Type Parameters
<T>
the value type
Imports
io.reactivex.Maybe

Interface indicating an operator implementation can be macro-fused back to Maybe in case the operator goes from Maybe to some other reactive type and then the sequence calls for toMaybe again:
Single<Integer> single = Maybe.just(1).isEmpty();
Maybe<Integer> maybe = single.toMaybe();
The Single.toMaybe() will check for this interface and call the fuseToMaybe() to return a Maybe which could be the Maybe-specific implementation of isEmpty().

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 Maybe<T>

Returns:

the Maybe instance
fuseToMaybe
()

Returns a (direct) Maybe for the operator.

Method Detail

fuseToMaybeback to summary
public Maybe<T> fuseToMaybe()

Returns a (direct) Maybe for the operator.

The implementation should handle the necessary RxJavaPlugins wrapping.

Returns:Maybe<T>

the Maybe instance