package okhttp3; import java.net.InetSocketAddress; import java.net.Proxy; /* loaded from: classes2.dex */ public final class Route { final Address address; final InetSocketAddress inetSocketAddress; final Proxy proxy; public Route(Address address, Proxy proxy, InetSocketAddress inetSocketAddress) { if (address == null) { throw new NullPointerException("address == null"); } if (proxy == null) { throw new NullPointerException("proxy == null"); } if (inetSocketAddress == null) { throw new NullPointerException("inetSocketAddress == null"); } this.address = address; this.proxy = proxy; this.inetSocketAddress = inetSocketAddress; } public Address address() { return this.address; } public boolean equals(Object obj) { if (obj instanceof Route) { Route route = (Route) obj; if (route.address.equals(this.address) && route.proxy.equals(this.proxy) && route.inetSocketAddress.equals(this.inetSocketAddress)) { return true; } } return false; } public int hashCode() { return ((((527 + this.address.hashCode()) * 31) + this.proxy.hashCode()) * 31) + this.inetSocketAddress.hashCode(); } public Proxy proxy() { return this.proxy; } public boolean requiresTunnel() { return this.address.sslSocketFactory != null && this.proxy.type() == Proxy.Type.HTTP; } public InetSocketAddress socketAddress() { return this.inetSocketAddress; } public String toString() { return "Route{" + this.inetSocketAddress + "}"; } }