Class PlateComponent


public class PlateComponent extends ItemComponent
PlateComponent manages everything about plates state of plate, item on plate, availability of plate, pickup status of plate servable status of plate, stacked status of plate, stackPlateArray to store id of plates in a stacked plates plate id (for single plates) and quantity of plates in a stack
  • Constructor Details

    • PlateComponent

      public PlateComponent(int id)
      Constructor for the PlateComponent. Initialises the plate state and id of the plate.
      Parameters:
      id - - the unique id for the plate component being created.
  • Method Details

    • create

      public void create()
      Creating the component. Sets up event listeners for plate
      Overrides:
      create in class Component
    • update

      public void update()
      Update plate, nothing to see here.
      Overrides:
      update in class Component
    • getPlateState

      public PlateComponent.PlateState getPlateState()
      Returns:
    • getPlateId

      public int getPlateId()
      Returns the plate id.
      Returns:
      - an integer representing the plate id.
    • isClean

      public boolean isClean()
      Returns true if the plate is clean.
      Returns:
      - true if the plate is clean, false otherwise.
    • washPlate

      public void washPlate()
      Sets the plate state to CLEAN.
    • usePlate

      public void usePlate()
      Sets the plate state to DIRTY.