Exemplo n.º 1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((creditName == null) ? 0 : creditName.hashCode());
   result = prime * result + ((familyName == null) ? 0 : familyName.hashCode());
   result = prime * result + ((givenNames == null) ? 0 : givenNames.hashCode());
   result = prime * result + ((otherNames == null) ? 0 : otherNames.hashCode());
   return result;
 }
Exemplo n.º 2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   PersonalDetails other = (PersonalDetails) obj;
   if (creditName == null) {
     if (other.creditName != null) return false;
   } else if (!creditName.equals(other.creditName)) return false;
   if (familyName == null) {
     if (other.familyName != null) return false;
   } else if (!familyName.equals(other.familyName)) return false;
   if (givenNames == null) {
     if (other.givenNames != null) return false;
   } else if (!givenNames.equals(other.givenNames)) return false;
   if (otherNames == null) {
     if (other.otherNames != null) return false;
   } else if (!otherNames.equals(other.otherNames)) return false;
   return true;
 }