Package no.ntnu.idatt1002.demo.data
Class RecipeStep
java.lang.Object
no.ntnu.idatt1002.demo.data.RecipeStep
- All Implemented Interfaces:
Storable
This class is representing an instruction for a recipe.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRecipeStep
(int stepId, int recipeId, int stepNumber, String instruction) Constructor for the RecipeStep class.RecipeStep
(int recipeId, int stepNumber, String instruction) Constructor for the RecipeStep class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute names of the recipe step.Returns the attributes of the recipe step.int
getId()
Returns the id of the recipe step.Returns the name of the id.Getter for the instruction.int
Getter for the recipe id.int
Getter for the step id.int
Getter for the step number.
-
Field Details
-
stepId
private int stepId -
recipeId
private int recipeId -
stepNumber
private int stepNumber -
instruction
-
-
Constructor Details
-
RecipeStep
Constructor for the RecipeStep class. When creating a new recipe step, the id is not known.- Parameters:
recipeId
- the id of the recipestepNumber
- the number of the stepinstruction
- the instruction of the step
-
RecipeStep
Constructor for the RecipeStep class. When creating a new recipe step, the id is not known.- Parameters:
recipeId
- the id of the recipestepNumber
- the number of the stepinstruction
- the instruction of the step
-
-
Method Details
-
getStepId
public int getStepId()Getter for the step id.- Returns:
- the step id
-
getRecipeId
public int getRecipeId()Getter for the recipe id.- Returns:
- the recipe id
-
getStepNumber
public int getStepNumber()Getter for the step number.- Returns:
- the step number
-
getInstruction
Getter for the instruction.- Returns:
- the instruction
-
getAttributes
Returns the attributes of the recipe step.- Specified by:
getAttributes
in interfaceStorable
- Returns:
- the attributes of the recipe step
-
getAttributeNames
Returns the attribute names of the recipe step.- Specified by:
getAttributeNames
in interfaceStorable
- Returns:
- the attribute names of the recipe step
-
getId
public int getId()Returns the id of the recipe step. -
getIdName
Returns the name of the id.
-