@Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof HttpRoute) {
            final HttpRoute that = (HttpRoute) obj;
            return
                    // Do the cheapest tests first
                    this.secure == that.secure &&
                            this.tunnelled == that.tunnelled &&
                            this.layered == that.layered &&
                            Objects.equals(this.targetHost, that.targetHost) &&
                            Objects.equals(this.targetName, that.targetName) &&
                            Objects.equals(this.localAddress, that.localAddress) &&
                            Objects.equals(this.proxyChain, that.proxyChain) &&
                            Objects.equals(this.unixDomainSocket, that.unixDomainSocket);
        }
        return false;
    }
Compares this route to another.

@param obj         the object to compare with

@return  {@code true} if the argument is the same route,
         {@code false}
httpclient5/src/main/java/org/apache/hc/client5/http/HttpRoute.java