package i.a.n.h;

import i.a.g;
import java.io.Serializable;

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

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

        a(i.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 i.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: compiled from: NotificationLite.java */
    static final class c implements Serializable {
        final m.b.b b;

        c(m.b.b bVar) {
            this.b = bVar;
        }

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

    public static <T> boolean accept(Object obj, m.b.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, m.b.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 c) {
            aVar.c(((c) obj).b);
            return false;
        }
        aVar.d(obj);
        return false;
    }

    public static Object complete() {
        return COMPLETE;
    }

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

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

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

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

    public static m.b.b getSubscription(Object obj) {
        return ((c) 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 c;
    }

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

    public static Object subscription(m.b.b bVar) {
        return new c(bVar);
    }

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

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

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