Class BoilerComponent

  • Direct Known Subclasses:
    Controller, Heater, Pump, Sensor

    public abstract class BoilerComponent
    extends java.lang.Object
    The abstract BoilerComponent is the basic class that models each of the components used in the model of the Boiler.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name
      The name of the component.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the name of the component.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        protected final java.lang.String name
        The name of the component.
    • Constructor Detail

      • BoilerComponent

        public BoilerComponent​(java.lang.String name)
        Constructs a BoilerComponent with a given name.
        Parameters:
        name - the name of the component
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the component.
        Returns:
        the name of the component
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object