package j;

import java.io.Serializable;

/* JADX INFO: compiled from: Result.kt */
/* JADX INFO: loaded from: classes.dex */
public final class q<T> implements Serializable {
    public static final a b = new a(null);

    /* JADX INFO: compiled from: Result.kt */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(j.p0.d.j jVar) {
            this();
        }
    }

    /* JADX INFO: compiled from: Result.kt */
    public static final class b implements Serializable {
        public final Throwable b;

        public b(Throwable th) {
            j.p0.d.r.f(th, "exception");
            this.b = th;
        }

        public boolean equals(Object obj) {
            return (obj instanceof b) && j.p0.d.r.a(this.b, ((b) obj).b);
        }

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

        public String toString() {
            return "Failure(" + this.b + ')';
        }
    }

    public static <T> Object a(Object obj) {
        return obj;
    }

    public static final boolean b(Object obj, Object obj2) {
        return j.p0.d.r.a(obj, obj2);
    }

    public static final Throwable c(Object obj) {
        if (obj instanceof b) {
            return ((b) obj).b;
        }
        return null;
    }

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