Example #1
0
 @Override
 public final int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((cpf == null) ? 0 : cpf.hashCode());
   return result;
 }
Example #2
0
 @Override
 public final boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   final PessoaFisica other = (PessoaFisica) obj;
   if (cpf == null) {
     if (other.cpf != null) {
       return false;
     }
   } else if (!cpf.equals(other.cpf)) {
     return false;
   }
   return true;
 }