Class RemoveCommand

  • All Implemented Interfaces:
    Command

    public class RemoveCommand
    extends java.lang.Object
    implements Command
    Remove command. This command removes an object from an array at a specified position.
    • Constructor Detail

      • RemoveCommand

        public RemoveCommand()
    • Method Detail

      • parseAndExecute

        public boolean parseAndExecute​(ScriptParser sp,
                                       TokenStream currentStream)
                                throws ScriptException
        Parse and execute. Parsing begins right after the command name, and should stop before the trailing semicolon.
        Specified by:
        parseAndExecute in interface Command
        Parameters:
        sp - is the script parser to use to help in the parsing.
        currentStream - is the current token stream.
        Returns:
        true to send a break signal, false otherwise.
        Throws:
        ScriptException
      • parseAndSkip

        public void parseAndSkip​(ScriptParser sp,
                                 TokenStream currentStream)
                          throws ScriptException
        Parse and skip. Parsing begins right after the command name, and should stop before the trailing semicolon.
        Specified by:
        parseAndSkip in interface Command
        Parameters:
        sp - is the script parser to use to help in the parsing.
        currentStream - is the current token stream.
        Throws:
        ScriptException