public class Recipe extends ProductAmountListOwner
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
instructions |
private java.lang.String |
name |
private int |
numberOfPeople |
Constructor and Description |
---|
Recipe(java.lang.String name)
Creates an empty recipe for one person.
|
Recipe(java.lang.String name,
int numberOfPeople)
Constructor used to make testing easier.
|
Recipe(java.lang.String name,
int numberOfPeople,
java.util.List<ProductAmount> productAmountList,
java.lang.String instructions) |
Recipe(java.lang.String name,
int numberOfPeople,
java.lang.String instructions)
Constructor used to make testing easier.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getInstructions() |
java.lang.String |
getName() |
int |
getNumberOfPeople() |
java.util.List<ProductAmount> |
getProductAmountList()
Gets a list of the products with their amounts
|
int |
hashCode() |
addProductAmount, addProductOrIncreaseAmount, getProductAmountByProductName, getUnderlyingProductAmountList, isEmpty, setUnderlyingProductAmountList
private int numberOfPeople
private java.lang.String name
private java.lang.String instructions
public Recipe(java.lang.String name) throws RecipeCreationException
name
- RecipeCreationException
public Recipe(java.lang.String name, int numberOfPeople, java.util.List<ProductAmount> productAmountList, java.lang.String instructions) throws RecipeCreationException
RecipeCreationException
public Recipe(java.lang.String name, int numberOfPeople) throws RecipeCreationException
name
- numberOfPeople
- RecipeCreationException
public Recipe(java.lang.String name, int numberOfPeople, java.lang.String instructions) throws RecipeCreationException
name
- numberOfPeople
- instructions
- RecipeCreationException
public int getNumberOfPeople()
public java.lang.String getName()
public java.lang.String getInstructions()
public java.util.List<ProductAmount> getProductAmountList()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object