Class LimitSwitch

  • All Implemented Interfaces:
    Switch

    public class LimitSwitch
    extends java.lang.Object
    implements Switch
    • Constructor Summary

      Constructors 
      Constructor Description
      LimitSwitch​(int port)
      Defined a limit switch.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isTriggered()
      Determines if the switch is triggered
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LimitSwitch

        public LimitSwitch​(int port)
        Defined a limit switch. By default it is normally open which means isTriggered is true when the switch is closed.
        Parameters:
        port - The port that the switch is connected to.
    • Method Detail

      • isTriggered

        public boolean isTriggered()
        Description copied from interface: Switch
        Determines if the switch is triggered
        Specified by:
        isTriggered in interface Switch
        Returns:
        true if the switch is triggered, false otherwise