MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / compose

Method compose

src/main/java/io/reactivex/rxjava3/core/Maybe.java:3089–3095  ·  view source on GitHub ↗

Transform a Maybe by applying a particular MaybeTransformer function to it. This method operates on the Maybe itself whereas #lift op

(@NonNull MaybeTransformer<? super T, ? extends R> transformer)

Source from the content-addressed store, hash-verified

3087 * @see <a href="https://github.com/ReactiveX/RxJava/wiki/Implementing-Your-Own-Operators">RxJava wiki: Implementing Your Own Operators</a>
3088 */
3089 @SuppressWarnings("unchecked")
3090 @CheckReturnValue
3091 @SchedulerSupport(SchedulerSupport.NONE)
3092 @NonNull
3093 public final <@NonNull R> Maybe<R> compose(@NonNull MaybeTransformer<? super T, ? extends R> transformer) {
3094 return wrap(((MaybeTransformer<T, R>) Objects.requireNonNull(transformer, "transformer is null")).apply(this));
3095 }
3096
3097 /**
3098 * Returns a {@code Maybe} that is based on applying a specified function to the item emitted by the current {@code Maybe},

Callers

nothing calls this directly

Calls 2

wrapMethod · 0.95
applyMethod · 0.65

Tested by

no test coverage detected