Uses of Enum Class
no.ntnu.idatt1002.demo.data.recipes.MeasuringUnit
Packages that use MeasuringUnit
-
Uses of MeasuringUnit in no.ntnu.idatt1002.demo.data.recipes
Methods in no.ntnu.idatt1002.demo.data.recipes that return MeasuringUnitModifier and TypeMethodDescriptionIngredient.getUnit()
The method returns the unit of measure of the ingredient as a value of the MeasuringUnit enum class.static MeasuringUnit
Returns the enum constant of this class with the specified name.static MeasuringUnit[]
MeasuringUnit.values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods in no.ntnu.idatt1002.demo.data.recipes with parameters of type MeasuringUnitModifier and TypeMethodDescriptionboolean
Recipe.addIngredient
(FoodItem ingredientType, double amount, MeasuringUnit unit) The method adds an ingredient to the recipe if it is not already in the recipe, in which case the existing ingredient of the same food type is updated with the parameters provided to this method.void
Ingredient.setUnit
(MeasuringUnit unit) The method takes in a value of the MeasuringUnit enum class and sets the ingredient's unit equal to this value.Constructors in no.ntnu.idatt1002.demo.data.recipes with parameters of type MeasuringUnitModifierConstructorDescriptionIngredient
(FoodItem ingredient, double amount, MeasuringUnit unit) The constructor of a new Ingredient object takes in three mandatory fields; ingredient type as defined in the enum class FoodItem, an amount and a unit of measure defined in the enum class MeasuringUnit.RecipeIngredient
(FoodItem ingredient, double amount, MeasuringUnit unit) The constructor of a RecipeIngredient object inherits from the superclass Ingredient.