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

Method wrap

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

Wraps a MaybeSource instance into a new Maybe instance if not already a Maybe instance. Scheduler: wrap does not op

(@NonNull MaybeSource<T> source)

Source from the content-addressed store, hash-verified

2279 * @throws NullPointerException if {@code source} is {@code null}
2280 */
2281 @CheckReturnValue
2282 @NonNull
2283 @SchedulerSupport(SchedulerSupport.NONE)
2284 public static <@NonNull T> Maybe<T> wrap(@NonNull MaybeSource<T> source) {
2285 if (source instanceof Maybe) {
2286 return RxJavaPlugins.onAssembly((Maybe<T>)source);
2287 }
2288 Objects.requireNonNull(source, "source is null");
2289 return RxJavaPlugins.onAssembly(new MaybeUnsafeCreate<>(source));
2290 }
2291
2292 /**
2293 * Returns a {@code Maybe} that emits the results of a specified combiner function applied to combinations of

Callers 10

wrapCustomMethod · 0.95
wrapMaybeMethod · 0.95
applyMethod · 0.95
startWithMethod · 0.95
startWithMethod · 0.95
startWithMethod · 0.95
ambArrayMethod · 0.95
composeMethod · 0.95
startWithMethod · 0.95
startWithMethod · 0.95

Calls 1

onAssemblyMethod · 0.95

Tested by 3

wrapCustomMethod · 0.76
wrapMaybeMethod · 0.76
applyMethod · 0.76