@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T> Maybe<T> wrap(MaybeSource<T> source) {
        if (source instanceof Maybe) {
            return RxJavaPlugins.onAssembly((Maybe<T>)source);
        }
        ObjectHelper.requireNonNull(source, "onSubscribe is null");
        return RxJavaPlugins.onAssembly(new MaybeUnsafeCreate<T>(source));
    }
@ CheckReturnValue @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) public static < T > Maybe < T > wrap ( MaybeSource < T > source ) { if ( source instanceof Maybe ) { return RxJavaPlugins . onAssembly ( ( Maybe < T > ) source ) ; } ObjectHelper . requireNonNull ( source , "onSubscribe is null" ) ; return RxJavaPlugins . onAssembly ( new MaybeUnsafeCreate < T > ( source ) ) ; }
Wraps a MaybeSource instance into a new Maybe instance if not already a Maybe
instance.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code wrap} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
@param <T> the value type
@param source the source to wrap
@return the Maybe wrapper or the source cast to Maybe (if possible)