Class WoolSetCommand

  • All Implemented Interfaces:
    Cloneable

    public class WoolSetCommand
    extends WoolExpressionCommand
    This class models a <<set ...>> command. It can be part of a WoolNodeBody (along with an agent statement) or a WoolReply (to be performed when the user chooses the reply). It contains an assign statement.
    • Method Detail

      • findReplyById

        public WoolReply findReplyById​(int replyId)
        Description copied from class: WoolCommand
        Tries to find a reply with the specified ID within this command. If no such reply is found, this method returns null.
        Specified by:
        findReplyById in class WoolCommand
        Parameters:
        replyId - the reply ID
        Returns:
        the reply or null
      • getReadVariableNames

        public void getReadVariableNames​(Set<String> varNames)
        Description copied from class: WoolCommand
        Retrieves all variable names that are read in this command and adds them to the specified set.
        Specified by:
        getReadVariableNames in class WoolCommand
        Parameters:
        varNames - the set to which the variable names are added
      • getWriteVariableNames

        public void getWriteVariableNames​(Set<String> varNames)
        Description copied from class: WoolCommand
        Retrieves all variable names that are written in this command and adds them to the specified set.
        Specified by:
        getWriteVariableNames in class WoolCommand
        Parameters:
        varNames - the set to which the variable names are added
      • getNodePointers

        public void getNodePointers​(Set<WoolNodePointer> pointers)
        Description copied from class: WoolCommand
        Retrieves all node pointers that occur in this command and adds them to the specified list.
        Specified by:
        getNodePointers in class WoolCommand
        Parameters:
        pointers - the list to which the node pointers are added
      • executeBodyCommand

        public void executeBodyCommand​(Map<String,​Object> variables,
                                       WoolNodeBody processedBody)
                                throws EvaluationException
        Description copied from class: WoolCommand
        This method is called if this command occurs in a statement body. It executes the command with respect to the specified variable map. Any body content that should be sent to the client, is added to "processedBody". This content can be text or client commands, with all variables resolved.
        Specified by:
        executeBodyCommand in class WoolCommand
        Parameters:
        variables - the variable map
        processedBody - the processed body
        Throws:
        EvaluationException - if an expression cannot be evaluated