Class WhileLoop

    • Field Detail

      • m_Condition

        protected BooleanCondition m_Condition
        the boolean condition to evaluate.
      • m_Actors

        protected Sequence m_Actors
        the actors to execute.
    • Constructor Detail

      • WhileLoop

        public WhileLoop()
    • Method Detail

      • setSkip

        public void setSkip​(boolean value)
        Sets whether the transformation is skipped or not.
        Specified by:
        setSkip in interface Actor
        Overrides:
        setSkip in class AbstractActor
        Parameters:
        value - true if transformation is to be skipped
      • conditionTipText

        public String conditionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setActors

        public void setActors​(Actor[] value)
        Sets the actors of the loop.
        Parameters:
        value - the actors
      • getActors

        public Actor[] getActors()
        Returns the actors of the loop.
        Returns:
        the actors
      • actorsTipText

        public String actorsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • forceVariables

        protected void forceVariables​(Variables value)
        Updates the Variables instance in use.

        Use with caution!
        Overrides:
        forceVariables in class AbstractControlActor
        Parameters:
        value - the instance to use
      • get

        public Actor get​(int index)
        Returns the actor at the given position.
        Specified by:
        get in interface ActorHandler
        Specified by:
        get in class AbstractControlActor
        Parameters:
        index - the position
        Returns:
        the actor
      • set

        public String set​(int index,
                          Actor actor)
        Sets the actor at the given position.
        Specified by:
        set in interface ActorHandler
        Specified by:
        set in class AbstractControlActor
        Parameters:
        index - the position
        actor - the actor to set at this position
        Returns:
        null if successful, otherwise error message
      • indexOf

        public int indexOf​(String actor)
        Returns the index of the actor.
        Specified by:
        indexOf in interface ActorHandler
        Specified by:
        indexOf in class AbstractControlActor
        Parameters:
        actor - the name of the actor to look for
        Returns:
        the index of -1 if not found
      • add

        public String add​(Actor actor)
        Inserts the actor at the end.
        Specified by:
        add in interface MutableActorHandler
        Parameters:
        actor - the actor to insert
        Returns:
        null if successful, otherwise error message
      • add

        public String add​(int index,
                          Actor actor)
        Inserts the actor at the given position.
        Specified by:
        add in interface MutableActorHandler
        Parameters:
        index - the position
        actor - the actor to insert
        Returns:
        null if successful, otherwise error message
      • remove

        public Actor remove​(int index)
        Removes the actor at the given position and returns the removed object.
        Specified by:
        remove in interface MutableActorHandler
        Parameters:
        index - the position
        Returns:
        the removed actor
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        adams.flow.core.Unknown.class
      • setUpLoopActors

        protected String setUpLoopActors()
        Gets called in the setUp() method. Returns null if loop-actors are fine, otherwise error message.
        Returns:
        null if everything OK, otherwise error message
      • setUpSubActors

        protected String setUpSubActors()
        Performs the setUp of the sub-actors.
        Overrides:
        setUpSubActors in class AbstractControlActor
        Returns:
        null if everything is fine, otherwise error message
      • input

        public void input​(Token token)
        Does nothing.
        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:
        always false
      • currentInput

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

        protected boolean doLoop()
        Checks whether the loop should be executed.
        Returns:
        true if the loop should be executed
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message