Esempio n. 1
0
 public void removeDiscount(Discount discount) {
   discounts.remove(discount);
   if (discount.getCoupon() == this) {
     discount.setCoupon(null);
   }
 }
Esempio n. 2
0
 public void addDiscount(Discount discount) {
   discounts.add(discount);
   if (discount.getCoupon() != this) {
     discount.setCoupon(this);
   }
 }