public class NutritionalValuesCalculator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
DOUBLE_PRECISION_VALUE |
Modifier | Constructor and Description |
---|---|
private |
NutritionalValuesCalculator() |
Modifier and Type | Method and Description |
---|---|
static NutritionalValues |
computeAllNutritionalValues(java.util.List<ProductAmount> productAmounts)
Calculate all the nutritional value for the list of product
|
static NutritionalValues |
computeNutritionalValues(ProductAmount productAmount)
Calculates the correct nutritional value (proteins, lipids, carbohydrates and calories) of a product with a certain quantity.
|
private static final int DOUBLE_PRECISION_VALUE
public static NutritionalValues computeNutritionalValues(ProductAmount productAmount)
productAmount
- product with quantitypublic static NutritionalValues computeAllNutritionalValues(java.util.List<ProductAmount> productAmounts)
productAmounts
-