Package | Description |
---|---|
be.ac.ulb.infof307.g02.controllers | |
be.ac.ulb.infof307.g02.database | |
be.ac.ulb.infof307.g02.models | |
be.ac.ulb.infof307.g02.utils | |
be.ac.ulb.infof307.g02.views |
Modifier and Type | Method and Description |
---|---|
void |
NutritionalValuesController.computerAndShowNutritionalView(ProductAmount productAmount)
Shows the nutritional value of a product with a certain amount
|
void |
GroceryListController.showShopsWithProduct(ProductAmount productAmount)
Shows shops containing a product
|
Modifier and Type | Method and Description |
---|---|
void |
NutritionalValuesController.computeAndShowNutritionalListView(java.util.List<ProductAmount> productAmounts)
Shows the nutritional value of a list of productAmounts.
|
void |
GroceryListController.saveGroceryList(java.util.List<ProductAmount> productAmountsList)
Creates a new GroceryList, fill it with all the items retrieved from the
view and saves it in the database.
|
Modifier and Type | Method and Description |
---|---|
private java.util.List<ProductAmount> |
RecipeDB.getRecipeProductAmounts(java.lang.String recipeName,
User recipeOwner)
Gets all the ProductAmounts of a recipe
|
Modifier and Type | Method and Description |
---|---|
void |
GroceryListDB.addItemToGroceryList(User listOwner,
java.lang.String listName,
ProductAmount item)
Add a GroceryListItem to a given GroceryList
|
void |
RecipeDB.addProductAmountToRecipe(User recipeOwner,
java.lang.String recipeName,
ProductAmount item)
Add a ProductAmount to a given Recipe
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<ProductAmount> |
ProductAmountListOwner.productAmountList |
private java.util.Map<Shop,java.util.List<ProductAmount>> |
BestTourFinder.productsAtShop |
Modifier and Type | Method and Description |
---|---|
ProductAmount |
ProductAmountListOwner.getProductAmountByProductName(java.lang.String name)
Search and return a product in the productAmountList list.
|
ProductAmount |
GroceryList.getProductAmountByProductName(java.lang.String name)
Searches and returns a product in the productAmountList.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<ProductAmount> |
GroceryList.getProductAmountList()
Gets a list of all the products of a grocery list with their amount
|
java.util.List<ProductAmount> |
Recipe.getProductAmountList()
Gets a list of the products with their amounts
|
private java.util.List<ProductAmount> |
BestTourFinder.getProductsAtShop(Shop shop)
Returns all the products that the purchaser will buy in a given shop during the best tour.
|
protected java.util.List<ProductAmount> |
ProductAmountListOwner.getUnderlyingProductAmountList()
Returns a direct reference to the product amount list (not a copy).
|
Modifier and Type | Method and Description |
---|---|
void |
ProductAmountListOwner.addProductAmount(ProductAmount newProductAmount)
Adds the product to the list.
|
void |
ProductAmountListOwner.addProductOrIncreaseAmount(ProductAmount productAmount)
Tries to insert an item in the list.
|
static NutritionalValues |
NutritionalValuesCalculator.computeNutritionalValues(ProductAmount productAmount)
Calculates the correct nutritional value (proteins, lipids, carbohydrates and calories) of a product with a certain quantity.
|
void |
GroceryList.deleteItem(ProductAmount productAmount)
Deletes an item from a grocery list
|
private Shop |
BestTourFinder.findBestShopForProduct(java.util.Set<Shop> solution,
java.util.Set<Shop> remainingShops,
ProductAmount productAmount)
Finds the best shop to buy the given product.
|
private double |
BestTourFinder.getCostForProductInNewShop(ProductAmount productAmount,
Shop shop,
java.util.Set<Shop> solution)
Gets the cost of buying the product in the shop, given that we haven't planned yet to go to that shop.
|
private double |
BestTourFinder.getCostForProductInVisitedShop(ProductAmount productAmount,
Shop shop)
Gets the cost of buying the product in the shop, given that we already planned to visit the shop to buy another
product.
|
private double |
BestTourFinder.getProductPriceAtShop(ProductAmount productAmount,
Shop shop)
Returns the price of buying a product in a certain amount at the given shop.
|
Modifier and Type | Method and Description |
---|---|
static NutritionalValues |
NutritionalValuesCalculator.computeAllNutritionalValues(java.util.List<ProductAmount> productAmounts)
Calculate all the nutritional value for the list of product
|
void |
ProductAmountListOwner.setUnderlyingProductAmountList(java.util.List<ProductAmount> productAmountList)
Only used for testing purposes
|
Constructor and Description |
---|
GroceryList(java.lang.String groceryListName,
java.util.List<ProductAmount> productList) |
ProductAmountListOwner(java.util.List<ProductAmount> productAmountList)
Constructor that creates a productAmountList from all the given ProductAmounts,
and handles the situation when there are 2 productAmounts with the same product
|
Recipe(java.lang.String name,
int numberOfPeople,
java.util.List<ProductAmount> productAmountList,
java.lang.String instructions) |
Modifier and Type | Method and Description |
---|---|
ProductAmount |
ProductAmountConverter.toObject(javafx.util.Pair<Product,java.lang.Double> pair) |
Modifier and Type | Method and Description |
---|---|
javafx.util.Pair<Product,java.lang.Double> |
ProductAmountConverter.toProductDoublePair(ProductAmount toConvert) |
Modifier and Type | Field and Description |
---|---|
private ListComponent<ProductAmount> |
GroceryListView.listComponent |
private ListComponent<ProductAmount> |
RecipeView.listComponent |
Modifier and Type | Method and Description |
---|---|
java.util.List<ProductAmount> |
GroceryListView.getProductAmountsList()
Gets all the products and amounts from the listComponent
|
java.util.List<ProductAmount> |
RecipeView.getProductAmountsList() |
Modifier and Type | Method and Description |
---|---|
void |
AvailabilityChecker.checkProductAvailability(ProductAmount product) |
void |
GroceryListView.checkProductAvailability(ProductAmount product)
Cheks if some product are available in some shops
|