public static boolean equivalent(final ProtocolVersion v1, final ProtocolVersion v2) { return LangUtils.equals(v1 != null ? v1 : HttpVersion.DEFAULT, v2 != null ? v2 : HttpVersion.DEFAULT ); }
@Override public int hashCode() { int hash = LangUtils.HASH_SEED; hash = LangUtils.hashCode(hash, this.username); return hash; }
@Override public boolean matches(final Object item) { if (item instanceof MessageHeaders) { final MessageHeaders messageHeaders = (MessageHeaders) item; for (final Iterator<Header> it = messageHeaders.headerIterator(); it.hasNext(); ) { final Header header = it.next(); if (headerName.equalsIgnoreCase(header.getName()) && LangUtils.equals(headerValue, header.getValue())) { return true; } } } return false; }
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { int hash = LangUtils.HASH_SEED; hash = LangUtils.hashCode(hash, this.lcHostname); hash = LangUtils.hashCode(hash, this.port); hash = LangUtils.hashCode(hash, this.schemeName); hash = LangUtils.hashCode(hash, address); return hash; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj instanceof URIAuthority) { final URIAuthority that = (URIAuthority) obj; return LangUtils.equals(this.userInfo, that.userInfo) && LangUtils.equals(this.hostname, that.hostname) && this.port == that.port; } return false; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj instanceof TimeValue) { final TimeValue that = (TimeValue) obj; return this.duration == that.duration && LangUtils.equals(this.timeUnit, that.timeUnit); } return false; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj instanceof TimeValue) { final TimeValue that = (TimeValue) obj; return this.duration == that.duration && LangUtils.equals(this.timeUnit, that.timeUnit); } 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; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj instanceof URIAuthority) { final URIAuthority that = (URIAuthority) obj; return LangUtils.equals(this.userInfo, that.userInfo) && LangUtils.equals(this.hostname, that.hostname) && this.port == that.port; } return false; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o instanceof BasicUserPrincipal) { final BasicUserPrincipal that = (BasicUserPrincipal) o; if (LangUtils.equals(this.username, that.username)) { return true; } } return false; }
@Override public int hashCode() { int hash = LangUtils.HASH_SEED; hash = LangUtils.hashCode(hash, this.protocol); hash = LangUtils.hashCode(hash, this.host); hash = LangUtils.hashCode(hash, this.port); hash = LangUtils.hashCode(hash, this.realm); hash = LangUtils.hashCode(hash, this.authScheme); return hash; }
@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; }