package kotlin; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.Intrinsics; import kotlin.ranges.IntRange; /* loaded from: classes5.dex */ public final class KotlinVersion implements Comparable { public final int major; public final int minor; public final int patch; public final int version; public static final Companion Companion = new Companion(null); public static final KotlinVersion CURRENT = KotlinVersionCurrentValue.get(); public int hashCode() { return this.version; } public KotlinVersion(int i, int i2, int i3) { this.major = i; this.minor = i2; this.patch = i3; this.version = versionOf(i, i2, i3); } public final int versionOf(int i, int i2, int i3) { if (new IntRange(0, 255).contains(i) && new IntRange(0, 255).contains(i2) && new IntRange(0, 255).contains(i3)) { return (i << 16) + (i2 << 8) + i3; } throw new IllegalArgumentException(("Version components are out of range: " + i + '.' + i2 + '.' + i3).toString()); } public String toString() { StringBuilder sb = new StringBuilder(); sb.append(this.major); sb.append('.'); sb.append(this.minor); sb.append('.'); sb.append(this.patch); return sb.toString(); } public boolean equals(Object obj) { if (this == obj) { return true; } KotlinVersion kotlinVersion = obj instanceof KotlinVersion ? (KotlinVersion) obj : null; return kotlinVersion != null && this.version == kotlinVersion.version; } @Override // java.lang.Comparable public int compareTo(KotlinVersion other) { Intrinsics.checkNotNullParameter(other, "other"); return this.version - other.version; } public static final class Companion { public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { this(); } public Companion() { } } }