Class Sequence

    • Field Detail


        public static final String BACKUP_CURRENT
        the key for storing the current token in the backup.
        See Also:
        Constant Field Values
      • m_CurrentToken

        protected transient Token m_CurrentToken
        the token that gets passed on to all sub-branches.
      • m_AllowStandalones

        protected boolean m_AllowStandalones
        whether to allow standalones or not.
      • m_AllowSource

        protected boolean m_AllowSource
        whether to allow a source or not.
      • m_RestrictingStops

        protected boolean m_RestrictingStops
        whether stops get restricted or not.
      • m_RestrictedStop

        protected boolean m_RestrictedStop
        whether a restricted stop occurred.
    • Constructor Detail

      • Sequence

        public Sequence()
        Default constructor.
      • Sequence

        public Sequence​(String name)
        Initializes the actor with the specified name.
        name - the name to use
    • Method Detail

      • actorsTipText

        public String actorsTipText()
        Returns the tip text for this property.
        Specified by:
        actorsTipText in class MutableConnectedControlActor
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getDefaultRestrictingStops

        protected boolean getDefaultRestrictingStops()
        Returns the default for restricting stops.
        true if restricted
      • setRestrictingStops

        public void setRestrictingStops​(boolean value)
        Sets whether to restrict stops or not.
        Specified by:
        setRestrictingStops in interface OptionalStopRestrictor
        value - true if to restrict
      • isRestrictingStops

        public boolean isRestrictingStops()
        Returns whether stops are being restricted.
        Specified by:
        isRestrictingStops in interface StopRestrictor
        true if restricting stops
      • isRestrictedStop

        public boolean isRestrictedStop()
        Returns whether the stop was a restricted one (that can be resumed).
        Specified by:
        isRestrictedStop in interface StopRestrictor
        true if restricted stop occurred
      • restrictedStopExecution

        public void restrictedStopExecution​(String msg)
        Stops the (restricted) execution.
        Specified by:
        restrictedStopExecution in interface StopRestrictor
        msg - the message to set as reason for stopping, can be null
      • setAllowStandalones

        public void setAllowStandalones​(boolean value)
        Sets whether standalones are allowed or not.
        value - true if standalones are allowed
      • getAllowStandalones

        public boolean getAllowStandalones()
        Returns whether standalones are allowed or not.
        true if standalones are allowed
      • setAllowSource

        public void setAllowSource​(boolean value)
        Sets whether a source is allowed or not.
        value - true if a source is allowed
      • getAllowSource

        public boolean getAllowSource()
        Returns whether a source is allowed or not.
        true if a source is allowed
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        the Class of objects that can be processed
      • input

        public void input​(Token token)
        The method that accepts the input token and then processes it.
        Specified by:
        input in interface InputConsumer
        token - the token to accept and process
      • hasInput

        public boolean hasInput()
        Returns whether an input token is currently present.
        Specified by:
        hasInput in interface InputConsumer
        true if input token present
      • currentInput

        public Token currentInput()
        Returns the current input token, if any.
        Specified by:
        currentInput in interface InputConsumer
        the input token, null if none present