package kn;

/* loaded from: classes3.dex */
public final class r {

    /* renamed from: c, reason: collision with root package name */
    public static final a f26031c = new a(null);

    /* renamed from: d, reason: collision with root package name */
    public static final r f26032d = new r(null, null);

    /* renamed from: a, reason: collision with root package name */
    private final s f26033a;

    /* renamed from: b, reason: collision with root package name */
    private final p f26034b;

    /* loaded from: classes3.dex */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(kotlin.jvm.internal.k kVar) {
            this();
        }

        public final r a(p type) {
            kotlin.jvm.internal.t.g(type, "type");
            return new r(s.IN, type);
        }

        public final r b(p type) {
            kotlin.jvm.internal.t.g(type, "type");
            return new r(s.OUT, type);
        }

        public final r c() {
            return r.f26032d;
        }

        public final r d(p type) {
            kotlin.jvm.internal.t.g(type, "type");
            return new r(s.INVARIANT, type);
        }
    }

    /* loaded from: classes3.dex */
    public /* synthetic */ class b {

        /* renamed from: a, reason: collision with root package name */
        public static final /* synthetic */ int[] f26035a;

        static {
            int[] iArr = new int[s.values().length];
            try {
                iArr[s.INVARIANT.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[s.IN.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[s.OUT.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            f26035a = iArr;
        }
    }

    public r(s sVar, p pVar) {
        String str;
        this.f26033a = sVar;
        this.f26034b = pVar;
        if ((sVar == null) == (pVar == null)) {
            return;
        }
        if (sVar == null) {
            str = "Star projection must have no type specified.";
        } else {
            str = "The projection variance " + sVar + " requires type to be specified.";
        }
        throw new IllegalArgumentException(str.toString());
    }

    public final s a() {
        return this.f26033a;
    }

    public final p b() {
        return this.f26034b;
    }

    public final p c() {
        return this.f26034b;
    }

    public final s d() {
        return this.f26033a;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof r)) {
            return false;
        }
        r rVar = (r) obj;
        return this.f26033a == rVar.f26033a && kotlin.jvm.internal.t.b(this.f26034b, rVar.f26034b);
    }

    public int hashCode() {
        s sVar = this.f26033a;
        int hashCode = (sVar == null ? 0 : sVar.hashCode()) * 31;
        p pVar = this.f26034b;
        return hashCode + (pVar != null ? pVar.hashCode() : 0);
    }

    public String toString() {
        s sVar = this.f26033a;
        int i10 = sVar == null ? -1 : b.f26035a[sVar.ordinal()];
        if (i10 == -1) {
            return "*";
        }
        if (i10 == 1) {
            return String.valueOf(this.f26034b);
        }
        if (i10 == 2) {
            return "in " + this.f26034b;
        }
        if (i10 != 3) {
            throw new rm.t();
        }
        return "out " + this.f26034b;
    }
}
