114 lines
3 KiB
Java
114 lines
3 KiB
Java
package d0.e0;
|
|
|
|
import d0.z.d.m;
|
|
import kotlin.NoWhenBranchMatchedException;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.reflect.KType;
|
|
/* compiled from: KTypeProjection.kt */
|
|
public final class i {
|
|
public static final i a = new i(null, null);
|
|
public static final a b = new a(null);
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final j f2419c;
|
|
public final KType d;
|
|
|
|
/* compiled from: KTypeProjection.kt */
|
|
public static final class a {
|
|
public a(DefaultConstructorMarker defaultConstructorMarker) {
|
|
}
|
|
|
|
public final i contravariant(KType kType) {
|
|
m.checkNotNullParameter(kType, "type");
|
|
return new i(j.IN, kType);
|
|
}
|
|
|
|
public final i covariant(KType kType) {
|
|
m.checkNotNullParameter(kType, "type");
|
|
return new i(j.OUT, kType);
|
|
}
|
|
|
|
public final i getSTAR() {
|
|
return i.a;
|
|
}
|
|
|
|
public final i invariant(KType kType) {
|
|
m.checkNotNullParameter(kType, "type");
|
|
return new i(j.INVARIANT, kType);
|
|
}
|
|
}
|
|
|
|
public i(j jVar, KType kType) {
|
|
String str;
|
|
this.f2419c = jVar;
|
|
this.d = kType;
|
|
if (!((jVar == null) != (kType == null) ? false : true)) {
|
|
if (jVar == null) {
|
|
str = "Star projection must have no type specified.";
|
|
} else {
|
|
str = "The projection variance " + jVar + " requires type to be specified.";
|
|
}
|
|
throw new IllegalArgumentException(str.toString());
|
|
}
|
|
}
|
|
|
|
public final j component1() {
|
|
return this.f2419c;
|
|
}
|
|
|
|
public final KType component2() {
|
|
return this.d;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof i)) {
|
|
return false;
|
|
}
|
|
i iVar = (i) obj;
|
|
return m.areEqual(this.f2419c, iVar.f2419c) && m.areEqual(this.d, iVar.d);
|
|
}
|
|
|
|
public final KType getType() {
|
|
return this.d;
|
|
}
|
|
|
|
public final j getVariance() {
|
|
return this.f2419c;
|
|
}
|
|
|
|
public int hashCode() {
|
|
j jVar = this.f2419c;
|
|
int i = 0;
|
|
int hashCode = (jVar != null ? jVar.hashCode() : 0) * 31;
|
|
KType kType = this.d;
|
|
if (kType != null) {
|
|
i = kType.hashCode();
|
|
}
|
|
return hashCode + i;
|
|
}
|
|
|
|
public String toString() {
|
|
j jVar = this.f2419c;
|
|
if (jVar == null) {
|
|
return "*";
|
|
}
|
|
int ordinal = jVar.ordinal();
|
|
if (ordinal == 0) {
|
|
return String.valueOf(this.d);
|
|
}
|
|
if (ordinal == 1) {
|
|
StringBuilder L = c.d.b.a.a.L("in ");
|
|
L.append(this.d);
|
|
return L.toString();
|
|
} else if (ordinal == 2) {
|
|
StringBuilder L2 = c.d.b.a.a.L("out ");
|
|
L2.append(this.d);
|
|
return L2.toString();
|
|
} else {
|
|
throw new NoWhenBranchMatchedException();
|
|
}
|
|
}
|
|
}
|