Class 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) boolean isComplete
      Holds whether the ShoppingCartIngredient has all of its fields completed.
      (package private) boolean isPickedUp
      Holds 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.
    • Field Detail

      • isPickedUp

        boolean isPickedUp
        Holds whether the ShoppingCartIngredient has been picked up.
      • isComplete

        boolean isComplete
        Holds whether the ShoppingCartIngredient has all of its fields completed.
    • 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.