예제 #1
0
 @Override
 public int hashCode() {
   int hash = LangUtils.HASH_SEED;
   hash = LangUtils.hashCode(hash, this.username);
   hash = LangUtils.hashCode(hash, this.domain);
   return hash;
 }
예제 #2
0
 @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;
 }
예제 #3
0
 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;
   }
 }
예제 #4
0
 /**
  * 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;
 }
예제 #6
0
 /**
  * Generates a hash code for this route.
  *
  * @return the hash code
  */
 @Override
 public final int hashCode() {
   int hash = LangUtils.HASH_SEED;
   hash = LangUtils.hashCode(hash, this.targetHost);
   hash = LangUtils.hashCode(hash, this.localAddress);
   if (this.proxyChain != null) {
     for (final HttpHost element : this.proxyChain) {
       hash = LangUtils.hashCode(hash, element);
     }
   }
   hash = LangUtils.hashCode(hash, this.secure);
   hash = LangUtils.hashCode(hash, this.tunnelled);
   hash = LangUtils.hashCode(hash, this.layered);
   return hash;
 }
예제 #7
0
 public int hashCode() {
   int hash = LangUtils.HASH_SEED;
   hash = LangUtils.hashCode(hash, this.name);
   hash = LangUtils.hashCode(hash, this.value);
   return hash;
 }