Class PumpTrouble

All Implemented Interfaces:
TroubleIface, HolderTroubleIface, NozzleTroubleIface, PumpTroubleIface

public class PumpTrouble extends PourAvailabilityTrouble implements PumpTroubleIface, HolderTroubleIface
Base trouble that provides convenience methods for blocking beverage and ingredient pouring for the specified pump.

Implements PumpTroubleIface to provide standardized data to external systems.

Since:
1.0
Version:
2023-09-27
  • Constructor Details

    • PumpTrouble

      public PumpTrouble(Pump<?> pump)
      Constructor
  • Method Details

    • blockIngredientPour

      public void blockIngredientPour()
      Block ingredient pouring on the associated pump.
    • blockBeveragePour

      public void blockBeveragePour()
      Block beverage pouring on the associated pump.
    • getNozzlePath

      public String getNozzlePath()
      Description copied from interface: NozzleTroubleIface
      Returns the path of the associated nozzle.
      Specified by:
      getNozzlePath in interface NozzleTroubleIface
    • getPumpPath

      public String getPumpPath()
      Description copied from interface: PumpTroubleIface
      Returns the path of the associated pump.
      Specified by:
      getPumpPath in interface PumpTroubleIface
    • getIngredientId

      public String getIngredientId()
      Description copied from interface: PumpTroubleIface
      Return the ingredientId assigned to the pump.
      Specified by:
      getIngredientId in interface PumpTroubleIface
    • getHolderPaths

      public String[] getHolderPaths()
      Description copied from interface: HolderTroubleIface
      Returns the paths of the associated holders. Many Trouble s only impact a single holder, but some impact more than one, so this provides a uniform mechanism to handle all varieties.
      Specified by:
      getHolderPaths in interface HolderTroubleIface
    • getHolderNames

      public String[] getHolderNames()
      Description copied from interface: HolderTroubleIface
      Returns the holder names in the same order as the paths. This allows Trouble s to be rendered without needing to look up the holders from the paths to get the names.
      Specified by:
      getHolderNames in interface HolderTroubleIface
    • toString

      public String toString()
      Overrides:
      toString in class Trouble
    • getPump

      public Pump<?> getPump()