Package jmri

Interface Signal

    • Method Detail

      • isCleared

        boolean isCleared()
        Determine whether this signal shows an aspect or appearance that allows travel past it, e.g. it's "been cleared". This might be a yellow or green appearance, or an Approach or Clear aspect.
        Returns:
        true if the signal is showing a clear indication; false otherwise
      • isShowingRestricting

        boolean isShowingRestricting()
        Determine whether this signal shows an aspect or appearance that allows travel past it only at restricted speed. This might be a flashing red appearance, or a Restricting aspect.
        Returns:
        true if the signal is showing a restricting indication; false otherwise
      • isAtStop

        boolean isAtStop()
        Determine whether this signal shows an aspect or appearance that forbid travel past it. This might be a red appearance, or a Stop aspect. Stop-and-Proceed or Restricting would return false here.
        Returns:
        true if the signal is showing a stop indication; false otherwise
      • getLit

        boolean getLit()
        Get whether the signal is lit or dark. Changes to this value can be listened to using the Lit property.
        Returns:
        true if lit; false if dark
      • setLit

        void setLit​(boolean newLit)
      • getHeld

        boolean getHeld()
        Get whether the signal is held. Changes to this value can be listened to using the Held property. It controls what mechanisms can control the signal's appearance. The actual semantics are defined by those external mechanisms.
        Returns:
        true if held; false otherwise
      • setHeld

        void setHeld​(boolean newHeld)