Exemple #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((startDateEndDate == null) ? 0 : startDateEndDate.hashCode());
   long temp;
   temp = Double.doubleToLongBits(weightInKilogram);
   result = prime * result + (int) (temp ^ (temp >>> 32));
   return result;
 }
Exemple #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (!(obj instanceof WeightInKg)) {
     return false;
   }
   WeightInKg other = (WeightInKg) obj;
   if (startDateEndDate == null) {
     if (other.startDateEndDate != null) {
       return false;
     }
   } else if (!startDateEndDate.equals(other.startDateEndDate)) {
     return false;
   }
   if (Double.doubleToLongBits(weightInKilogram)
       != Double.doubleToLongBits(other.weightInKilogram)) {
     return false;
   }
   return true;
 }