import java.text.MessageFormat;
import java.util.Objects;
-import org.mxchange.jcoree.BaseEeSystem;
+import org.mxchange.jcoreee.BaseEeSystem;
+import org.mxchange.jshopcore.model.basket.AddableBasketItem;
import org.mxchange.jshopcore.model.product.Product;
/**
*/
private Product product;
- @Override
- public Float calculateTotalPrice () {
- // product should be set
- if (this.getProduct() == null) {
- // Abort here
- throw new NullPointerException("product is null"); //NOI18N
- }
-
- // Calculate and return it
- // TODO: If later other purchaseable items (other than products) are handled through this class, this needs expansion
- return (this.getAmount() * this.getProduct().getPrice());
- }
-
@Override
public int compareTo (final AddableBasketItem item) {
// Trace message