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(); }
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); }