Package com.xffffff.wellfed.shoppingcart
Class ShoppingCartIngredient
- java.lang.Object
-
- com.xffffff.wellfed.ingredient.Ingredient
-
- com.xffffff.wellfed.shoppingcart.ShoppingCartIngredient
-
- All Implemented Interfaces:
java.io.Serializable
public class ShoppingCartIngredient extends Ingredient
This class represents a ShoppingCartIngredient, which are Ingredients that can be added to a ShoppingCart.- See Also:
ShoppingCart, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanisCompleteHolds whether the ShoppingCartIngredient has all of its fields completed.(package private) booleanisPickedUpHolds whether the ShoppingCartIngredient has been picked up.
-
Constructor Summary
Constructors Constructor Description ShoppingCartIngredient(Ingredient ingredient)Create a ShoppingCartIngredient using an Ingredient.ShoppingCartIngredient(java.lang.String description)Creates a ShoppingCartIngredient which represents an Ingredient which can be added to a ShoppingCart.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisComplete()Gets whether a ShoppingCartIngredient has its fields completed.booleanisPickedUp()Gets whether the ShoppingCartIngredient has been picked up.voidsetComplete(boolean complete)Sets whether a ShoppingCartIngredient has its fields completed.voidsetPickedUp(boolean pickedUp)Sets whether a ShoppingCartIngredient has been picked up.-
Methods inherited from class com.xffffff.wellfed.ingredient.Ingredient
getAmount, getCategory, getDescription, getId, getUnit, isEqual, setAmount, setCategory, setDescription, setId, setUnit
-
-
-
-
Constructor Detail
-
ShoppingCartIngredient
public ShoppingCartIngredient(java.lang.String description)
Creates a ShoppingCartIngredient which represents an Ingredient which can be added to a ShoppingCart.- Parameters:
description- A String representing the description of a ShoppingCartIngredient.
-
ShoppingCartIngredient
public ShoppingCartIngredient(Ingredient ingredient)
Create a ShoppingCartIngredient using an Ingredient.- Parameters:
ingredient- The Ingredient to use.
-
-
Method Detail
-
isPickedUp
public boolean isPickedUp()
Gets whether the ShoppingCartIngredient has been picked up.- Returns:
- A boolean representing whether the ShoppingCartIngredient has been picked up.
-
setPickedUp
public void setPickedUp(boolean pickedUp)
Sets whether a ShoppingCartIngredient has been picked up.- Parameters:
pickedUp- A boolean representing whether the ShoppingCartIngredient has been picked up.
-
isComplete
public boolean isComplete()
Gets whether a ShoppingCartIngredient has its fields completed.- Returns:
- A boolean representing whether the ShoppingCartIngredient has completed fields.
-
setComplete
public void setComplete(boolean complete)
Sets whether a ShoppingCartIngredient has its fields completed.- Parameters:
complete- A boolean representing whether the ShoppingCartIngredient has completed fields.
-
-