Interface Switch

    • Method Detail

      • isTriggered

        boolean isTriggered()
        Determines if the switch is triggered
        Returns:
        true if the switch is triggered, false otherwise
      • invert

        static Switch invert​(Switch s1)
        Invert the output of the switch
        Returns:
        The inverted switch
      • and

        static Switch and​(Switch s1,
                          Switch s2)
        Combine two switches using the and operator
        Parameters:
        s1 - The first switch
        s2 - The second switch
        Returns:
        The combined switch consisting of s1 and s2 in an and gate.
      • or

        static Switch or​(Switch s1,
                         Switch s2)
        Combine two switches using the or operator
        Parameters:
        s1 - The first switch
        s2 - The second switch
        Returns:
        The combined switch consisting of s1 and s2 in an or gate.
      • xor

        static Switch xor​(Switch s1,
                          Switch s2)
        Combine two switches using the xor operator
        Parameters:
        s1 - The first switch
        s2 - The second switch
        Returns:
        The combined switch consisting of s1 and s2 in an xor gate.