what-the-bank/sources/o/gkC.java

87 lines
2.5 KiB
Java

package o;
import java.io.Serializable;
import java.net.InetAddress;
import java.util.Locale;
/* loaded from: classes6.dex */
public final class gkC implements Cloneable, Serializable {
public String a;
private String b;
private int c;
private String d;
private InetAddress e;
public gkC(String str, int i, String str2) {
if (str == null) {
StringBuilder sb = new StringBuilder();
sb.append("Host name");
sb.append(" may not be null");
throw new IllegalArgumentException(sb.toString());
}
if (str.length() == 0) {
StringBuilder sb2 = new StringBuilder();
sb2.append("Host name");
sb2.append(" may not be empty");
throw new IllegalArgumentException(sb2.toString());
}
if (str != null) {
for (int i2 = 0; i2 < str.length(); i2++) {
if (Character.isWhitespace(str.charAt(i2))) {
StringBuilder sb3 = new StringBuilder();
sb3.append("Host name");
sb3.append(" may not contain blanks");
throw new IllegalArgumentException(sb3.toString());
}
}
}
this.a = str;
this.d = str.toLowerCase(Locale.ROOT);
this.b = str2 != null ? str2.toLowerCase(Locale.ROOT) : "http";
this.c = i;
this.e = null;
}
public gkC(String str, int i) {
this(str, i, null);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof gkC)) {
return false;
}
gkC gkc = (gkC) obj;
if (!this.d.equals(gkc.d) || this.c != gkc.c || !this.b.equals(gkc.b)) {
return false;
}
InetAddress inetAddress = gkc.e;
return true;
}
public final Object clone() throws CloneNotSupportedException {
return super.clone();
}
public final int hashCode() {
String str = this.d;
int hashCode = (((str != null ? str.hashCode() : 0) + 629) * 37) + this.c;
String str2 = this.b;
return (hashCode * 37) + (str2 != null ? str2.hashCode() : 0);
}
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.b);
sb.append("://");
sb.append(this.a);
if (this.c != -1) {
sb.append(':');
sb.append(Integer.toString(this.c));
}
return sb.toString();
}
}