Class Sequence

    • Field Detail

      • BACKUP_CURRENT

        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.
        Parameters:
        name - the name to use
    • Method Detail

      • actorsTipText

        public String actorsTipText()
        Returns the tip text for this property.
        Specified by:
        actorsTipText in class MutableConnectedControlActor
        Returns:
        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.
        Returns:
        true if restricted
      • setRestrictingStops

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

        public boolean isRestrictingStops()
        Returns whether stops are being restricted.
        Specified by:
        isRestrictingStops in interface StopRestrictor
        Returns:
        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
        Returns:
        true if restricted stop occurred
      • restrictedStopExecution

        public void restrictedStopExecution​(String msg)
        Stops the (restricted) execution.
        Specified by:
        restrictedStopExecution in interface StopRestrictor
        Parameters:
        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.
        Parameters:
        value - true if standalones are allowed
      • getAllowStandalones

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

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

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

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        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
        Parameters:
        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
        Returns:
        true if input token present
      • currentInput

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