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

Method wrap

src/main/java/io/reactivex/rxjava3/core/Observable.java:4432–4441  ·  view source on GitHub ↗

Wraps an ObservableSource into an Observable if not already an Observable. Scheduler: wrap does not operate by default on a particular Scheduler. @param the value type @param source the ObservableSource insta

(@NonNull ObservableSource<T> source)

Source from the content-addressed store, hash-verified

4430 * @throws NullPointerException if {@code source} is {@code null}
4431 */
4432 @CheckReturnValue
4433 @SchedulerSupport(SchedulerSupport.NONE)
4434 @NonNull
4435 public static <@NonNull T> Observable<T> wrap(@NonNull ObservableSource<T> source) {
4436 Objects.requireNonNull(source, "source is null");
4437 if (source instanceof Observable) {
4438 return RxJavaPlugins.onAssembly((Observable<T>)source);
4439 }
4440 return RxJavaPlugins.onAssembly(new ObservableFromUnsafeSource<>(source));
4441 }
4442
4443 /**
4444 * Returns an {@code Observable} that emits the results of a specified combiner function applied to combinations of

Callers 15

wrapMethod · 0.95
ignoreCancelMethod · 0.95
onErrorAfterCrashMethod · 0.95
onCompleteAfterCrashMethod · 0.95
onCompleteCrashMethod · 0.95
ignoreCancelMethod · 0.95
ambArrayMethod · 0.95
concatArrayMethod · 0.95

Calls 1

onAssemblyMethod · 0.95

Tested by 11

wrapMethod · 0.76
ignoreCancelMethod · 0.76
onErrorAfterCrashMethod · 0.76
onCompleteAfterCrashMethod · 0.76
onCompleteCrashMethod · 0.76
ignoreCancelMethod · 0.76
iteratorMethod · 0.76