this.setProductTitle(product.getProductTitle());
}
+ @Override
+ public boolean equals (final Object obj) {
+ if (this == obj) {
+ return true;
+ } else if (obj == null) {
+ return false;
+ } else if (this.getClass() != obj.getClass()) {
+ return false;
+ }
+
+ final Product other = (Product) obj;
+
+ if (!Objects.equals(this.getProductTitle(), other.getProductTitle())) {
+ return false;
+ }
+
+ return Objects.equals(this.getProductId(), other.getProductId());
+ }
+
+ @Override
+ public int hashCode () {
+ int hash = 7;
+ hash = 23 * hash + Objects.hashCode(this.getProductId());
+ hash = 23 * hash + Objects.hashCode(this.getProductTitle());
+ return hash;
+ }
+
@Override
public Boolean getProductAvailability () {
return this.productAvailability;