/** * Calls the associated hook function. * @param source the hook's input value * @return the value returned by the hook */ @NonNull public static Completable onAssembly(@NonNull Completable source) { Function<? super Completable, ? extends Completable> f = onCompletableAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param source the hook's input value * @return the value returned by the hook */ @NonNull public static Completable onAssembly(@NonNull Completable source) { Function<? super Completable, ? extends Completable> f = onCompletableAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Maybe<T> onAssembly(@NonNull Maybe<T> source) { Function<? super Maybe, ? extends Maybe> f = onMaybeAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Observable<T> onAssembly(@NonNull Observable<T> source) { Function<? super Observable, ? extends Observable> f = onObservableAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> ConnectableObservable<T> onAssembly(@NonNull ConnectableObservable<T> source) { Function<? super ConnectableObservable, ? extends ConnectableObservable> f = onConnectableObservableAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Single<T> onAssembly(@NonNull Single<T> source) { Function<? super Single, ? extends Single> f = onSingleAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Single<T> onAssembly(@NonNull Single<T> source) { Function<? super Single, ? extends Single> f = onSingleAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Maybe<T> onAssembly(@NonNull Maybe<T> source) { Function<? super Maybe, ? extends Maybe> f = onMaybeAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Observable<T> onAssembly(@NonNull Observable<T> source) { Function<? super Observable, ? extends Observable> f = onObservableAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> ConnectableObservable<T> onAssembly(@NonNull ConnectableObservable<T> source) { Function<? super ConnectableObservable, ? extends ConnectableObservable> f = onConnectableObservableAssembly; if (f != null) { return apply(f, source); } return source; }
/** * Wraps the call to the Scheduler creation function in try-catch and propagates thrown * checked exceptions as RuntimeException and enforces that result is not null. * @param f the function to call, not null (not verified). Cannot return null * @param s the parameter value to the function * @return the result of the function call, not null * @throws NullPointerException if the function parameter returns null */ @NonNull static Scheduler applyRequireNonNull(@NonNull Function<? super Callable<Scheduler>, ? extends Scheduler> f, Callable<Scheduler> s) { return ObjectHelper.requireNonNull(apply(f, s), "Scheduler Callable result can't be null"); }
/** * Wraps the call to the Scheduler creation function in try-catch and propagates thrown * checked exceptions as RuntimeException and enforces that result is not null. * @param f the function to call, not null (not verified). Cannot return null * @param s the parameter value to the function * @return the result of the function call, not null * @throws NullPointerException if the function parameter returns null */ @NonNull static Scheduler applyRequireNonNull(@NonNull Function<? super Callable<Scheduler>, ? extends Scheduler> f, Callable<Scheduler> s) { return ObjectHelper.requireNonNull(apply(f, s), "Scheduler Callable result can't be null"); }
/** * Calls the associated hook function. * @param source the hook's input value * @param observer the observer * @return the value returned by the hook */ @NonNull public static CompletableObserver onSubscribe(@NonNull Completable source, @NonNull CompletableObserver observer) { BiFunction<? super Completable, ? super CompletableObserver, ? extends CompletableObserver> f = onCompletableSubscribe; if (f != null) { return apply(f, source, observer); } return observer; }
/** * Calls the associated hook function. * @param source the hook's input value * @param observer the observer * @return the value returned by the hook */ @NonNull public static CompletableObserver onSubscribe(@NonNull Completable source, @NonNull CompletableObserver observer) { BiFunction<? super Completable, ? super CompletableObserver, ? extends CompletableObserver> f = onCompletableSubscribe; if (f != null) { return apply(f, source, observer); } return observer; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @param observer the observer * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Observer<? super T> onSubscribe(@NonNull Observable<T> source, @NonNull Observer<? super T> observer) { BiFunction<? super Observable, ? super Observer, ? extends Observer> f = onObservableSubscribe; if (f != null) { return apply(f, source, observer); } return observer; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @param observer the observer * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> Observer<? super T> onSubscribe(@NonNull Observable<T> source, @NonNull Observer<? super T> observer) { BiFunction<? super Observable, ? super Observer, ? extends Observer> f = onObservableSubscribe; if (f != null) { return apply(f, source, observer); } return observer; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @param observer the observer * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> SingleObserver<? super T> onSubscribe(@NonNull Single<T> source, @NonNull SingleObserver<? super T> observer) { BiFunction<? super Single, ? super SingleObserver, ? extends SingleObserver> f = onSingleSubscribe; if (f != null) { return apply(f, source, observer); } return observer; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @param observer the observer * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> SingleObserver<? super T> onSubscribe(@NonNull Single<T> source, @NonNull SingleObserver<? super T> observer) { BiFunction<? super Single, ? super SingleObserver, ? extends SingleObserver> f = onSingleSubscribe; if (f != null) { return apply(f, source, observer); } return observer; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @param subscriber the subscriber * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> MaybeObserver<? super T> onSubscribe(@NonNull Maybe<T> source, @NonNull MaybeObserver<? super T> subscriber) { BiFunction<? super Maybe, ? super MaybeObserver, ? extends MaybeObserver> f = onMaybeSubscribe; if (f != null) { return apply(f, source, subscriber); } return subscriber; }
/** * Calls the associated hook function. * @param <T> the value type * @param source the hook's input value * @param subscriber the subscriber * @return the value returned by the hook */ @SuppressWarnings({ "rawtypes", "unchecked" }) @NonNull public static <T> MaybeObserver<? super T> onSubscribe(@NonNull Maybe<T> source, @NonNull MaybeObserver<? super T> subscriber) { BiFunction<? super Maybe, ? super MaybeObserver, ? extends MaybeObserver> f = onMaybeSubscribe; if (f != null) { return apply(f, source, subscriber); } return subscriber; }