Exemple #1
0
 @Override
 public boolean equals(Object o) {
   if (this == o) {
     return true;
   }
   if (o == null || getClass() != o.getClass()) {
     return false;
   }
   Sale sale = (Sale) o;
   return Objects.equals(id, sale.id);
 }
Exemple #2
0
 @Override
 public int hashCode() {
   return Objects.hashCode(id);
 }