Issue 158: Added equals and hashcode to ProductItemPrice (test fails under maven)

This commit is contained in:
Jason King 2011-09-21 09:57:37 +01:00
parent 6f01848608
commit f1d6ca2b7f
1 changed files with 16 additions and 0 deletions

View File

@ -140,4 +140,20 @@ public class ProductItemPrice implements Comparable<ProductItemPrice> {
+ hourlyRecurringFee + "]";
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProductItemPrice that = (ProductItemPrice) o;
if (id != that.id) return false;
return true;
}
@Override
public int hashCode() {
return (int) (id ^ (id >>> 32));
}
}