Package edu.ntnu.stud.model
Class ShoppingList
java.lang.Object
edu.ntnu.stud.model.ShoppingList
The ShoppingList class is responsible for managing the user's shopping list.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clears the shopping list by removing all items from the shopping list and shopping_list.json.static List
<Ingredient> Get the shopping list from shopping_list.json.static void
updateShoppingList
(String recipeName) Updates the shopping list by comparing the ingredients in the recipe with the inventory.
-
Constructor Details
-
ShoppingList
public ShoppingList()
-
-
Method Details
-
updateShoppingList
Updates the shopping list by comparing the ingredients in the recipe with the inventory.- Parameters:
recipeName
- The name of the recipe to update the shopping list with
-
getShoppingList
Get the shopping list from shopping_list.json.- Returns:
- The shopping list
-
clearShoppingList
public static void clearShoppingList()Clears the shopping list by removing all items from the shopping list and shopping_list.json.
-