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.
| Modifier and Type | Method and Description |
|---|---|
| public Maybe |
| fuseToMaybe | back to summary |
|---|---|
| public Maybe Returns a (direct) Maybe for the operator. The implementation should handle the necessary RxJavaPlugins wrapping.
| |