X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fmxchange%2Fjshopcore%2Fmodel%2Fbasket%2FBasket.java;h=28d1eeb2735d84bf428598fc15b48c48b9b79068;hb=672084ab2c551cbff8c8c424780ed344f7c13925;hp=ea7e899778a5e361eb4839877e56d9ee8ea6cbc1;hpb=cfe7224d4385196244c556167c84c5593bddf252;p=jcustomer-core.git diff --git a/src/org/mxchange/jshopcore/model/basket/Basket.java b/src/org/mxchange/jshopcore/model/basket/Basket.java index ea7e899..28d1eeb 100644 --- a/src/org/mxchange/jshopcore/model/basket/Basket.java +++ b/src/org/mxchange/jshopcore/model/basket/Basket.java @@ -22,7 +22,7 @@ import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException; /** * An interface for baskets - * + *
* @author Roland Haeder
* @param item Item instance to add
- * @throws org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException If the item instance has already been added
+ * @throws org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException
+ * If the item instance has already been added
*/
public void addItem (final T item) throws BasketItemAlreadyAddedException;
@@ -41,40 +42,40 @@ public interface Basket
* @return Map on all basket items
*/
public List
* @return Last added item in basket
*/
public T getLast ();
/**
* Getter for last num rows
- *
+ *
* @return Last num rows
*/
public int getLastNumRows ();
+
+ /**
+ * Checks whether the given item has already been added by checking the
+ * item's id.
+ *
+ * @param item Item instance to check
+ * @return Whether the given item has been found
+ */
+ public boolean isAdded (final T item);
+
+ /**
+ * Checks if the basket is empty
+ *
+ * @return Whether the basket is empty
+ */
+ public boolean isEmpty ();
}