Example #1
0
 public Seller(Seller other) {
   this.name = other.name;
   this.product = new Product(other.product);
   this.minPrice = other.minPrice;
   this.strategy = other.getStrategy();
   this.decrement = other.getDecrement();
 }
Example #2
0
 public static boolean isValid(Seller seller) {
   return (seller.getName() != null
       && !seller.getName().isEmpty()
       && Product.isValid(seller.getProduct())
       && seller.decrement.compareTo(BigDecimal.ZERO) == 1
       && seller.minPrice.compareTo(BigDecimal.ZERO) == 1);
 }