Class Switch.SwitchDirector

    • Field Detail

      • m_CaseToken

        protected transient Token m_CaseToken
        the token to use in the switch cases.
    • Constructor Detail

      • SwitchDirector

        public SwitchDirector()
    • Method Detail

      • setControlActor

        public void setControlActor​(AbstractDirectedControlActor value)
        Sets the group to execute.
        Parameters:
        value - the group
      • setCaseToken

        public void setCaseToken​(Token value)
        Sets the token to use in the switch cases.
        Parameters:
        value - the token to use
      • getCaseToken

        public Token getCaseToken()
        Returns the token to be forwarded to switch cases.
        Returns:
        the token, can be null if not yet set
      • whichCase

        protected int whichCase()
        Determines which case to execute.
        Returns:
        the index of the case to execute
      • execute

        public String execute()
        Executes the group of actors.
        Specified by:
        execute in class AbstractDirector
        Returns:
        null if everything went smooth