示例#1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((contactOwner == null) ? 0 : contactOwner.hashCode());
   result = prime * result + ((contactOwnerKeyId == null) ? 0 : contactOwnerKeyId.hashCode());
   result = prime * result + ((ecPublicKey == null) ? 0 : ecPublicKey.hashCode());
   result = prime * result + ((alias == null) ? 0 : alias.hashCode());
   return result;
 }
示例#2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   Contact other = (Contact) obj;
   if (contactOwner == null) {
     if (other.contactOwner != null) return false;
   } else if (!contactOwner.equals(other.contactOwner)) return false;
   if (contactOwnerKeyId == null) {
     if (other.contactOwnerKeyId != null) return false;
   } else if (!contactOwnerKeyId.equals(other.contactOwnerKeyId)) return false;
   if (ecPublicKey == null) {
     if (other.ecPublicKey != null) return false;
   } else if (!ecPublicKey.equals(other.ecPublicKey)) return false;
   if (alias == null) {
     if (other.alias != null) return false;
   } else if (!alias.equals(other.alias)) return false;
   return true;
 }