抖阴.apk(点击下载) / a.java


package io.reactivex;

import io.reactivex.annotations.BackpressureKind;
import io.reactivex.annotations.BackpressureSupport;
import io.reactivex.annotations.CheckReturnValue;
import io.reactivex.annotations.Experimental;
import io.reactivex.annotations.NonNull;
import io.reactivex.annotations.Nullable;
import io.reactivex.annotations.SchedulerSupport;
import io.reactivex.disposables.b;
import io.reactivex.internal.functions.Functions;
import io.reactivex.internal.observers.CallbackCompletableObserver;
import io.reactivex.internal.observers.EmptyCompletableObserver;
import io.reactivex.internal.operators.completable.CompletableAndThenCompletable;
import io.reactivex.internal.operators.completable.CompletableCache;
import io.reactivex.internal.operators.completable.CompletableConcat;
import io.reactivex.internal.operators.completable.CompletableConcatArray;
import io.reactivex.internal.operators.completable.CompletableConcatIterable;
import io.reactivex.internal.operators.completable.CompletableCreate;
import io.reactivex.internal.operators.completable.CompletableDelay;
import io.reactivex.internal.operators.completable.CompletableDoFinally;
import io.reactivex.internal.operators.completable.CompletableMerge;
import io.reactivex.internal.operators.completable.CompletableMergeArray;
import io.reactivex.internal.operators.completable.CompletableMergeIterable;
import io.reactivex.internal.operators.completable.CompletableObserveOn;
import io.reactivex.internal.operators.completable.CompletableResumeNext;
import io.reactivex.internal.operators.completable.CompletableSubscribeOn;
import io.reactivex.internal.operators.completable.CompletableTakeUntilCompletable;
import io.reactivex.internal.operators.completable.CompletableTimer;
import io.reactivex.internal.operators.completable.CompletableUsing;
import io.reactivex.internal.operators.completable.a0;
import io.reactivex.internal.operators.completable.c;
import io.reactivex.internal.operators.completable.e;
import io.reactivex.internal.operators.completable.f;
import io.reactivex.internal.operators.completable.h;
import io.reactivex.internal.operators.completable.i;
import io.reactivex.internal.operators.completable.j;
import io.reactivex.internal.operators.completable.k;
import io.reactivex.internal.operators.completable.l;
import io.reactivex.internal.operators.completable.m;
import io.reactivex.internal.operators.completable.n;
import io.reactivex.internal.operators.completable.o;
import io.reactivex.internal.operators.completable.p;
import io.reactivex.internal.operators.completable.q;
import io.reactivex.internal.operators.completable.s;
import io.reactivex.internal.operators.completable.t;
import io.reactivex.internal.operators.completable.u;
import io.reactivex.internal.operators.completable.v;
import io.reactivex.internal.operators.completable.w;
import io.reactivex.internal.operators.completable.y;
import io.reactivex.internal.operators.completable.z;
import io.reactivex.internal.operators.maybe.MaybeDelayWithCompletable;
import io.reactivex.internal.operators.maybe.r;
import io.reactivex.internal.operators.maybe.x;
import io.reactivex.internal.operators.mixed.CompletableAndThenObservable;
import io.reactivex.internal.operators.mixed.CompletableAndThenPublisher;
import io.reactivex.internal.operators.single.SingleDelayWithCompletable;
import io.reactivex.internal.util.ExceptionHelper;
import io.reactivex.observers.TestObserver;
import io.reactivex.s0.g;
import io.reactivex.t0.a.d;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.reactivestreams.Publisher;

/* compiled from: Completable */
public abstract class a implements g {
    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a a(g... gVarArr) {
        io.reactivex.internal.functions.a.a((Object) gVarArr, "sources is null");
        if (gVarArr.length == 0) {
            return r();
        }
        if (gVarArr.length == 1) {
            return h(gVarArr[0]);
        }
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.a(gVarArr, null));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a b(g... gVarArr) {
        io.reactivex.internal.functions.a.a((Object) gVarArr, "sources is null");
        if (gVarArr.length == 0) {
            return r();
        }
        if (gVarArr.length == 1) {
            return h(gVarArr[0]);
        }
        return io.reactivex.v0.a.a(new CompletableConcatArray(gVarArr));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    public static a c(Publisher<? extends g> publisher) {
        return a(publisher, 2);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a d(Callable<?> callable) {
        io.reactivex.internal.functions.a.a((Object) callable, "callable is null");
        return io.reactivex.v0.a.a(new j(callable));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @CheckReturnValue
    public static a e(Publisher<? extends g> publisher) {
        return a(publisher, Integer.MAX_VALUE, false);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @CheckReturnValue
    public static a f(Publisher<? extends g> publisher) {
        return a(publisher, Integer.MAX_VALUE, true);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a g(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "source is null");
        if (!(gVar instanceof a)) {
            return io.reactivex.v0.a.a(new o(gVar));
        }
        throw new IllegalArgumentException("Use of unsafeCreate(Completable)!");
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a h(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "source is null");
        if (gVar instanceof a) {
            return io.reactivex.v0.a.a((a) gVar);
        }
        return io.reactivex.v0.a.a(new o(gVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a r() {
        return io.reactivex.v0.a.a(f.t);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public static a s() {
        return io.reactivex.v0.a.a(u.t);
    }

    /* access modifiers changed from: protected */
    public abstract void b(d dVar);

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a i() {
        return a(Functions.b());
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a j() {
        return io.reactivex.v0.a.a(new c(this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a k() {
        return d(o().C());
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a l() {
        return d(o().E());
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    public final b m() {
        EmptyCompletableObserver emptyCompletableObserver = new EmptyCompletableObserver();
        a((d) emptyCompletableObserver);
        return emptyCompletableObserver;
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final TestObserver<Void> n() {
        TestObserver<Void> testObserver = new TestObserver<>();
        a((d) testObserver);
        return testObserver;
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    public final <T> j<T> o() {
        if (this instanceof io.reactivex.t0.a.b) {
            return ((io.reactivex.t0.a.b) this).b();
        }
        return io.reactivex.v0.a.a(new y(this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final <T> q<T> p() {
        if (this instanceof io.reactivex.t0.a.c) {
            return ((io.reactivex.t0.a.c) this).c();
        }
        return io.reactivex.v0.a.a(new r(this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final <T> z<T> q() {
        if (this instanceof d) {
            return ((d) this).a();
        }
        return io.reactivex.v0.a.a(new z(this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a c(Callable<? extends Throwable> callable) {
        io.reactivex.internal.functions.a.a((Object) callable, "errorSupplier is null");
        return io.reactivex.v0.a.a(new h(callable));
    }

    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    @CheckReturnValue
    public static a f(long j, TimeUnit timeUnit) {
        return d(j, timeUnit, io.reactivex.w0.b.a());
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @Nullable
    public final Throwable e() {
        io.reactivex.internal.observers.f fVar = new io.reactivex.internal.observers.f();
        a((d) fVar);
        return fVar.b();
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
    @CheckReturnValue
    @NonNull
    public static <T> a d(Publisher<T> publisher) {
        io.reactivex.internal.functions.a.a((Object) publisher, "publisher is null");
        return io.reactivex.v0.a.a(new l(publisher));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a f() {
        return io.reactivex.v0.a.a(new CompletableCache(this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a c(g... gVarArr) {
        io.reactivex.internal.functions.a.a((Object) gVarArr, "sources is null");
        if (gVarArr.length == 0) {
            return r();
        }
        if (gVarArr.length == 1) {
            return h(gVarArr[0]);
        }
        return io.reactivex.v0.a.a(new CompletableMergeArray(gVarArr));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final b f(io.reactivex.s0.a aVar) {
        io.reactivex.internal.functions.a.a((Object) aVar, "onComplete is null");
        CallbackCompletableObserver callbackCompletableObserver = new CallbackCompletableObserver(aVar);
        a((d) callbackCompletableObserver);
        return callbackCompletableObserver;
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a d(g... gVarArr) {
        io.reactivex.internal.functions.a.a((Object) gVarArr, "sources is null");
        return io.reactivex.v0.a.a(new s(gVarArr));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a g(io.reactivex.s0.a aVar) {
        io.reactivex.internal.functions.a.a((Object) aVar, "run is null");
        return io.reactivex.v0.a.a(new i(aVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a e(io.reactivex.s0.a aVar) {
        g<? super b> d2 = Functions.d();
        g<? super Throwable> d3 = Functions.d();
        io.reactivex.s0.a aVar2 = Functions.f7411c;
        return a(d2, d3, aVar2, aVar, aVar2, aVar2);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @Experimental
    public final <T> i0<y<T>> h() {
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.r(this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a e(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return b(gVar, this);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a a(Iterable<? extends g> iterable) {
        io.reactivex.internal.functions.a.a((Object) iterable, "sources is null");
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.a(null, iterable));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a b(Iterable<? extends g> iterable) {
        io.reactivex.internal.functions.a.a((Object) iterable, "sources is null");
        return io.reactivex.v0.a.a(new CompletableConcatIterable(iterable));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a d(Iterable<? extends g> iterable) {
        io.reactivex.internal.functions.a.a((Object) iterable, "sources is null");
        return io.reactivex.v0.a.a(new t(iterable));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a f(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return io.reactivex.v0.a.a(new CompletableTakeUntilCompletable(this, gVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a g() {
        return io.reactivex.v0.a.a(new p(this));
    }

    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    @CheckReturnValue
    public final a e(long j, TimeUnit timeUnit) {
        return b(j, timeUnit, io.reactivex.w0.b.a(), null);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    @NonNull
    public static a a(Publisher<? extends g> publisher, int i) {
        io.reactivex.internal.functions.a.a((Object) publisher, "sources is null");
        io.reactivex.internal.functions.a.a(i, "prefetch");
        return io.reactivex.v0.a.a(new CompletableConcat(publisher, i));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a b(Callable<? extends g> callable) {
        io.reactivex.internal.functions.a.a((Object) callable, "completableSupplier");
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.b(callable));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    public static a d(long j, TimeUnit timeUnit, h0 h0Var) {
        io.reactivex.internal.functions.a.a((Object) timeUnit, "unit is null");
        io.reactivex.internal.functions.a.a((Object) h0Var, "scheduler is null");
        return io.reactivex.v0.a.a(new CompletableTimer(j, timeUnit, h0Var));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a c(Iterable<? extends g> iterable) {
        io.reactivex.internal.functions.a.a((Object) iterable, "sources is null");
        return io.reactivex.v0.a.a(new CompletableMergeIterable(iterable));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static <T> a b(w<T> wVar) {
        io.reactivex.internal.functions.a.a((Object) wVar, "maybe is null");
        return io.reactivex.v0.a.a(new x(wVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a a(e eVar) {
        io.reactivex.internal.functions.a.a((Object) eVar, "source is null");
        return io.reactivex.v0.a.a(new CompletableCreate(eVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    public static a c(Publisher<? extends g> publisher, int i) {
        return a(publisher, i, true);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    public final void d() {
        io.reactivex.internal.observers.f fVar = new io.reactivex.internal.observers.f();
        a((d) fVar);
        fVar.a();
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static <T> a b(e0<T> e0Var) {
        io.reactivex.internal.functions.a.a((Object) e0Var, "observable is null");
        return io.reactivex.v0.a.a(new k(e0Var));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a c(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return io.reactivex.v0.a.a(new CompletableAndThenCompletable(this, gVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a a(Throwable th) {
        io.reactivex.internal.functions.a.a((Object) th, "error is null");
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.g(th));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static <T> a b(o0<T> o0Var) {
        io.reactivex.internal.functions.a.a((Object) o0Var, "single is null");
        return io.reactivex.v0.a.a(new n(o0Var));
    }

    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    @CheckReturnValue
    public final a c(long j, TimeUnit timeUnit) {
        return a(j, timeUnit, io.reactivex.w0.b.a(), false);
    }

    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    @CheckReturnValue
    @Experimental
    public final a d(long j, TimeUnit timeUnit) {
        return b(j, timeUnit, io.reactivex.w0.b.a());
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a a(Future<?> future) {
        io.reactivex.internal.functions.a.a((Object) future, "future is null");
        return g(Functions.a(future));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a c(io.reactivex.s0.a aVar) {
        g<? super b> d2 = Functions.d();
        g<? super Throwable> d3 = Functions.d();
        io.reactivex.s0.a aVar2 = Functions.f7411c;
        return a(d2, d3, aVar, aVar2, aVar2, aVar2);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a d(io.reactivex.s0.a aVar) {
        g<? super b> d2 = Functions.d();
        g<? super Throwable> d3 = Functions.d();
        io.reactivex.s0.a aVar2 = Functions.f7411c;
        return a(d2, d3, aVar2, aVar2, aVar2, aVar);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    public static a b(Publisher<? extends g> publisher, int i) {
        return a(publisher, i, false);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a c(g<? super b> gVar) {
        g<? super Throwable> d2 = Functions.d();
        io.reactivex.s0.a aVar = Functions.f7411c;
        return a(gVar, d2, aVar, aVar, aVar, aVar);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a d(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return c(this, gVar);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static a a(Runnable runnable) {
        io.reactivex.internal.functions.a.a((Object) runnable, "run is null");
        return io.reactivex.v0.a.a(new m(runnable));
    }

    private static NullPointerException b(Throwable th) {
        NullPointerException nullPointerException = new NullPointerException("Actually not, but can't pass out an exception otherwise...");
        nullPointerException.initCause(th);
        return nullPointerException;
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a c(io.reactivex.s0.o<? super j<Throwable>, ? extends Publisher<?>> oVar) {
        return d(o().B(oVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final <E extends d> E c(E e2) {
        a((d) e2);
        return e2;
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final <U> U d(io.reactivex.s0.o<? super a, U> oVar) {
        try {
            return (U) ((io.reactivex.s0.o) io.reactivex.internal.functions.a.a((Object) oVar, "converter is null")).apply(this);
        } catch (Throwable th) {
            io.reactivex.exceptions.a.b(th);
            throw ExceptionHelper.c(th);
        }
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    @NonNull
    private static a a(Publisher<? extends g> publisher, int i, boolean z) {
        io.reactivex.internal.functions.a.a((Object) publisher, "sources is null");
        io.reactivex.internal.functions.a.a(i, "maxConcurrency");
        return io.reactivex.v0.a.a(new CompletableMerge(publisher, i, z));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a b(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "next is null");
        return io.reactivex.v0.a.a(new CompletableAndThenCompletable(this, gVar));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    public final a c(long j, TimeUnit timeUnit, h0 h0Var) {
        return b(j, timeUnit, h0Var, null);
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    public final a c(h0 h0Var) {
        io.reactivex.internal.functions.a.a((Object) h0Var, "scheduler is null");
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.d(this, h0Var));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @Nullable
    public final Throwable b(long j, TimeUnit timeUnit) {
        io.reactivex.internal.functions.a.a((Object) timeUnit, "unit is null");
        io.reactivex.internal.observers.f fVar = new io.reactivex.internal.observers.f();
        a((d) fVar);
        return fVar.b(j, timeUnit);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public static <R> a a(Callable<R> callable, io.reactivex.s0.o<? super R, ? extends g> oVar, g<? super R> gVar) {
        return a((Callable) callable, (io.reactivex.s0.o) oVar, (g) gVar, true);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public static <R> a a(Callable<R> callable, io.reactivex.s0.o<? super R, ? extends g> oVar, g<? super R> gVar, boolean z) {
        io.reactivex.internal.functions.a.a((Object) callable, "resourceSupplier is null");
        io.reactivex.internal.functions.a.a((Object) oVar, "completableFunction is null");
        io.reactivex.internal.functions.a.a((Object) gVar, "disposer is null");
        return io.reactivex.v0.a.a(new CompletableUsing(callable, oVar, gVar, z));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @Experimental
    public final a b(long j, TimeUnit timeUnit, h0 h0Var) {
        return d(j, timeUnit, h0Var).b(this);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a b(g<? super Throwable> gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "onEvent is null");
        return io.reactivex.v0.a.a(new e(this, gVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a a(g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return a(this, gVar);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a b(io.reactivex.s0.a aVar) {
        io.reactivex.internal.functions.a.a((Object) aVar, "onFinally is null");
        return io.reactivex.v0.a.a(new CompletableDoFinally(this, aVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final <T> z<T> a(e0<T> e0Var) {
        io.reactivex.internal.functions.a.a((Object) e0Var, "next is null");
        return io.reactivex.v0.a.a(new CompletableAndThenObservable(this, e0Var));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a b(io.reactivex.s0.o<? super j<Object>, ? extends Publisher<?>> oVar) {
        return d(o().z(oVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    @NonNull
    public final <T> j<T> a(Publisher<T> publisher) {
        io.reactivex.internal.functions.a.a((Object) publisher, "next is null");
        return io.reactivex.v0.a.a(new CompletableAndThenPublisher(this, publisher));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a b(long j) {
        return d(o().e(j));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a b(io.reactivex.s0.r<? super Throwable> rVar) {
        return d(o().e(rVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final <T> i0<T> a(o0<T> o0Var) {
        io.reactivex.internal.functions.a.a((Object) o0Var, "next is null");
        return io.reactivex.v0.a.a(new SingleDelayWithCompletable(o0Var, this));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @BackpressureSupport(BackpressureKind.FULL)
    @CheckReturnValue
    @NonNull
    public final <T> j<T> b(Publisher<T> publisher) {
        io.reactivex.internal.functions.a.a((Object) publisher, "other is null");
        return o().j((Publisher) publisher);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final <T> q<T> a(w<T> wVar) {
        io.reactivex.internal.functions.a.a((Object) wVar, "next is null");
        return io.reactivex.v0.a.a(new MaybeDelayWithCompletable(wVar, this));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    public final a b(h0 h0Var) {
        io.reactivex.internal.functions.a.a((Object) h0Var, "scheduler is null");
        return io.reactivex.v0.a.a(new CompletableSubscribeOn(this, h0Var));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    private a b(long j, TimeUnit timeUnit, h0 h0Var, g gVar) {
        io.reactivex.internal.functions.a.a((Object) timeUnit, "unit is null");
        io.reactivex.internal.functions.a.a((Object) h0Var, "scheduler is null");
        return io.reactivex.v0.a.a(new io.reactivex.internal.operators.completable.x(this, j, timeUnit, h0Var, gVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final <R> R a(@NonNull b<? extends R> bVar) {
        return (R) ((b) io.reactivex.internal.functions.a.a((Object) bVar, "converter is null")).apply(this);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final boolean a(long j, TimeUnit timeUnit) {
        io.reactivex.internal.functions.a.a((Object) timeUnit, "unit is null");
        io.reactivex.internal.observers.f fVar = new io.reactivex.internal.observers.f();
        a((d) fVar);
        return fVar.a(j, timeUnit);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(h hVar) {
        return h(((h) io.reactivex.internal.functions.a.a((Object) hVar, "transformer is null")).apply(this));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    public final a a(long j, TimeUnit timeUnit, h0 h0Var) {
        return a(j, timeUnit, h0Var, false);
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    public final a a(long j, TimeUnit timeUnit, h0 h0Var, boolean z) {
        io.reactivex.internal.functions.a.a((Object) timeUnit, "unit is null");
        io.reactivex.internal.functions.a.a((Object) h0Var, "scheduler is null");
        return io.reactivex.v0.a.a(new CompletableDelay(this, j, timeUnit, h0Var, z));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(g<? super Throwable> gVar) {
        g<? super b> d2 = Functions.d();
        io.reactivex.s0.a aVar = Functions.f7411c;
        return a(d2, gVar, aVar, aVar, aVar, aVar);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    private a a(g<? super b> gVar, g<? super Throwable> gVar2, io.reactivex.s0.a aVar, io.reactivex.s0.a aVar2, io.reactivex.s0.a aVar3, io.reactivex.s0.a aVar4) {
        io.reactivex.internal.functions.a.a((Object) gVar, "onSubscribe is null");
        io.reactivex.internal.functions.a.a((Object) gVar2, "onError is null");
        io.reactivex.internal.functions.a.a((Object) aVar, "onComplete is null");
        io.reactivex.internal.functions.a.a((Object) aVar2, "onTerminate is null");
        io.reactivex.internal.functions.a.a((Object) aVar3, "onAfterTerminate is null");
        io.reactivex.internal.functions.a.a((Object) aVar4, "onDispose is null");
        return io.reactivex.v0.a.a(new w(this, gVar, gVar2, aVar, aVar2, aVar3, aVar4));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(io.reactivex.s0.a aVar) {
        g<? super b> d2 = Functions.d();
        g<? super Throwable> d3 = Functions.d();
        io.reactivex.s0.a aVar2 = Functions.f7411c;
        return a(d2, d3, aVar2, aVar2, aVar, aVar2);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a a(f fVar) {
        io.reactivex.internal.functions.a.a((Object) fVar, "onLift is null");
        return io.reactivex.v0.a.a(new q(this, fVar));
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    public final a a(h0 h0Var) {
        io.reactivex.internal.functions.a.a((Object) h0Var, "scheduler is null");
        return io.reactivex.v0.a.a(new CompletableObserveOn(this, h0Var));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a a(io.reactivex.s0.r<? super Throwable> rVar) {
        io.reactivex.internal.functions.a.a((Object) rVar, "predicate is null");
        return io.reactivex.v0.a.a(new v(this, rVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final a a(io.reactivex.s0.o<? super Throwable, ? extends g> oVar) {
        io.reactivex.internal.functions.a.a((Object) oVar, "errorMapper is null");
        return io.reactivex.v0.a.a(new CompletableResumeNext(this, oVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(long j) {
        return d(o().d(j));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(io.reactivex.s0.e eVar) {
        return d(o().a(eVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(io.reactivex.s0.d<? super Integer, ? super Throwable> dVar) {
        return d(o().b(dVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final a a(long j, io.reactivex.s0.r<? super Throwable> rVar) {
        return d(o().a(j, rVar));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final <T> z<T> a(z<T> zVar) {
        io.reactivex.internal.functions.a.a((Object) zVar, "other is null");
        return zVar.c((e0) q());
    }

    @Override // io.reactivex.g
    @SchedulerSupport(SchedulerSupport.NONE)
    public final void a(d dVar) {
        io.reactivex.internal.functions.a.a((Object) dVar, "observer is null");
        try {
            d a = io.reactivex.v0.a.a(this, dVar);
            io.reactivex.internal.functions.a.a((Object) a, "The RxJavaPlugins.onSubscribe hook returned a null CompletableObserver. Please check the handler provided to RxJavaPlugins.setOnCompletableSubscribe for invalid null returns. Further reading: https://github.com/ReactiveX/RxJava/wiki/Plugins");
            b(a);
        } catch (NullPointerException e2) {
            throw e2;
        } catch (Throwable th) {
            io.reactivex.exceptions.a.b(th);
            io.reactivex.v0.a.b(th);
            throw b(th);
        }
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final b a(io.reactivex.s0.a aVar, g<? super Throwable> gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "onError is null");
        io.reactivex.internal.functions.a.a((Object) aVar, "onComplete is null");
        CallbackCompletableObserver callbackCompletableObserver = new CallbackCompletableObserver(gVar, aVar);
        a((d) callbackCompletableObserver);
        return callbackCompletableObserver;
    }

    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    @CheckReturnValue
    @NonNull
    public final a a(long j, TimeUnit timeUnit, g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return b(j, timeUnit, io.reactivex.w0.b.a(), gVar);
    }

    @SchedulerSupport(SchedulerSupport.CUSTOM)
    @CheckReturnValue
    @NonNull
    public final a a(long j, TimeUnit timeUnit, h0 h0Var, g gVar) {
        io.reactivex.internal.functions.a.a((Object) gVar, "other is null");
        return b(j, timeUnit, h0Var, gVar);
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final <T> i0<T> a(Callable<? extends T> callable) {
        io.reactivex.internal.functions.a.a((Object) callable, "completionValueSupplier is null");
        return io.reactivex.v0.a.a(new a0(this, callable, null));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    @NonNull
    public final <T> i0<T> a(T t) {
        io.reactivex.internal.functions.a.a((Object) t, "completionValue is null");
        return io.reactivex.v0.a.a(new a0(this, null, t));
    }

    @SchedulerSupport(SchedulerSupport.NONE)
    @CheckReturnValue
    public final TestObserver<Void> a(boolean z) {
        TestObserver<Void> testObserver = new TestObserver<>();
        if (z) {
            testObserver.cancel();
        }
        a((d) testObserver);
        return testObserver;
    }
}