@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o instanceof NTUserPrincipal) { final NTUserPrincipal that = (NTUserPrincipal) o; if (LangUtils.equals(this.username, that.username) && LangUtils.equals(this.domain, that.domain)) { return true; } } return false; }
public boolean equals(final Object object) { if (object == null) return false; if (this == object) return true; if (object instanceof NameValuePair) { BasicNameValuePair that = (BasicNameValuePair) object; return this.name.equals(that.name) && LangUtils.equals(this.value, that.value); } else { return false; } }
/** * Compares this route to another. * * @param obj the object to compare with * @return <code>true</code> if the argument is the same route, <code>false</code> */ @Override public final 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) && LangUtils.equals(this.targetHost, that.targetHost) && LangUtils.equals(this.localAddress, that.localAddress) && LangUtils.equals(this.proxyChain, that.proxyChain); } else { return false; } }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o instanceof UsernamePasswordCredentials) { final UsernamePasswordCredentials that = (UsernamePasswordCredentials) o; if (LangUtils.equals(this.principal, that.principal)) { return true; } } return false; }