what-the-bank/sources/okhttp3/Route.java

76 lines
2.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3;
import com.airbnb.deeplinkdispatch.UrlTreeKt;
import java.net.InetSocketAddress;
import java.net.Proxy;
import o.C14957gcv;
/* loaded from: classes.dex */
public final class Route {
private final Address address;
private final Proxy proxy;
private final InetSocketAddress socketAddress;
public Route(Address address, Proxy proxy, InetSocketAddress inetSocketAddress) {
C14957gcv.e(address, "");
C14957gcv.e(proxy, "");
C14957gcv.e(inetSocketAddress, "");
this.address = address;
this.proxy = proxy;
this.socketAddress = inetSocketAddress;
}
public final boolean requiresTunnel() {
return this.address.sslSocketFactory() != null && this.proxy.type() == Proxy.Type.HTTP;
}
public final boolean equals(Object obj) {
if (obj instanceof Route) {
Route route = (Route) obj;
if (C14957gcv.b(route.address, this.address) && C14957gcv.b(route.proxy, this.proxy) && C14957gcv.b(route.socketAddress, this.socketAddress)) {
return true;
}
}
return false;
}
public final int hashCode() {
int hashCode = this.address.hashCode();
return ((((hashCode + 527) * 31) + this.proxy.hashCode()) * 31) + this.socketAddress.hashCode();
}
public final String toString() {
StringBuilder sb = new StringBuilder("Route{");
sb.append(this.socketAddress);
sb.append(UrlTreeKt.componentParamSuffixChar);
return sb.toString();
}
public final InetSocketAddress socketAddress() {
return this.socketAddress;
}
public final Proxy proxy() {
return this.proxy;
}
public final Address address() {
return this.address;
}
/* renamed from: -deprecated_socketAddress, reason: not valid java name */
public final InetSocketAddress m489deprecated_socketAddress() {
return this.socketAddress;
}
/* renamed from: -deprecated_proxy, reason: not valid java name */
public final Proxy m488deprecated_proxy() {
return this.proxy;
}
/* renamed from: -deprecated_address, reason: not valid java name */
public final Address m487deprecated_address() {
return this.address;
}
}