package f.a.n.h;

import f.a.f;
import java.io.Serializable;

/* JADX INFO: compiled from: NotificationLite.java */
/* JADX INFO: loaded from: classes.dex */
public enum c {
    COMPLETE;

    /* JADX INFO: compiled from: NotificationLite.java */
    static final class a implements Serializable {
        final f.a.k.b b;

        a(f.a.k.b bVar) {
            this.b = bVar;
        }

        public String toString() {
            return "NotificationLite.Disposable[" + this.b + "]";
        }
    }

    /* JADX INFO: compiled from: NotificationLite.java */
    static final class b implements Serializable {
        final Throwable b;

        b(Throwable th) {
            this.b = th;
        }

        public boolean equals(Object obj) {
            if (obj instanceof b) {
                return f.a.n.b.b.c(this.b, ((b) obj).b);
            }
            return false;
        }

        public int hashCode() {
            return this.b.hashCode();
        }

        public String toString() {
            return "NotificationLite.Error[" + this.b + "]";
        }
    }

    /* JADX INFO: renamed from: f.a.n.h.c$c, reason: collision with other inner class name */
    /* JADX INFO: compiled from: NotificationLite.java */
    static final class C0055c implements Serializable {
        final j.a.b b;

        C0055c(j.a.b bVar) {
            this.b = bVar;
        }

        public String toString() {
            return "NotificationLite.Subscription[" + this.b + "]";
        }
    }

    public static <T> boolean accept(Object obj, j.a.a<? super T> aVar) {
        if (obj == COMPLETE) {
            aVar.b();
            return true;
        }
        if (obj instanceof b) {
            aVar.a(((b) obj).b);
            return true;
        }
        aVar.d(obj);
        return false;
    }

    public static <T> boolean acceptFull(Object obj, j.a.a<? super T> aVar) {
        if (obj == COMPLETE) {
            aVar.b();
            return true;
        }
        if (obj instanceof b) {
            aVar.a(((b) obj).b);
            return true;
        }
        if (obj instanceof C0055c) {
            aVar.c(((C0055c) obj).b);
            return false;
        }
        aVar.d(obj);
        return false;
    }

    public static Object complete() {
        return COMPLETE;
    }

    public static Object disposable(f.a.k.b bVar) {
        return new a(bVar);
    }

    public static Object error(Throwable th) {
        return new b(th);
    }

    public static f.a.k.b getDisposable(Object obj) {
        return ((a) obj).b;
    }

    public static Throwable getError(Object obj) {
        return ((b) obj).b;
    }

    public static j.a.b getSubscription(Object obj) {
        return ((C0055c) obj).b;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static <T> T getValue(Object obj) {
        return obj;
    }

    public static boolean isComplete(Object obj) {
        return obj == COMPLETE;
    }

    public static boolean isDisposable(Object obj) {
        return obj instanceof a;
    }

    public static boolean isError(Object obj) {
        return obj instanceof b;
    }

    public static boolean isSubscription(Object obj) {
        return obj instanceof C0055c;
    }

    public static <T> Object next(T t) {
        return t;
    }

    public static Object subscription(j.a.b bVar) {
        return new C0055c(bVar);
    }

    @Override // java.lang.Enum
    public String toString() {
        return "NotificationLite.Complete";
    }

    public static <T> boolean accept(Object obj, f<? super T> fVar) {
        if (obj == COMPLETE) {
            fVar.b();
            return true;
        }
        if (obj instanceof b) {
            fVar.a(((b) obj).b);
            return true;
        }
        fVar.d(obj);
        return false;
    }

    public static <T> boolean acceptFull(Object obj, f<? super T> fVar) {
        if (obj == COMPLETE) {
            fVar.b();
            return true;
        }
        if (obj instanceof b) {
            fVar.a(((b) obj).b);
            return true;
        }
        if (obj instanceof a) {
            fVar.c(((a) obj).b);
            return false;
        }
        fVar.d(obj);
        return false;
    }
}
