Class GotoNamedXYZCommand

java.lang.Object
  |
  +--Command
        |
        +--GotoNamedXYZCommand

public class GotoNamedXYZCommand
extends Command

A class that encapsulates a command to move the robot to a defined endpoint. This class is a concrete implementation of the Command class, and is a part of REMOTE's implementation of the Command Pattern, as demonstrated in Gamma et al (page 236).

See Also:
SimulationEngine, CommandQueue

Constructor Summary
GotoNamedXYZCommand(int lineNumber, java.lang.String name)
          Creates a new GotoNamedXYZCommand, which will move the Robot to the previously defined endpoint associated with the given name.
 
Method Summary
 void Execute()
          Moves the Robot to a previously defined endpoint, as saved in the XYZTable singleton instance.
 
Methods inherited from class Command
getSourceLine, setSourceLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GotoNamedXYZCommand

public GotoNamedXYZCommand(int lineNumber,
                           java.lang.String name)
Creates a new GotoNamedXYZCommand, which will move the Robot to the previously defined endpoint associated with the given name.
Parameters:
lineNumber - the source line for this command.
name - the name of the endpoint definition.
Method Detail

Execute

public void Execute()
             throws java.lang.Exception
Moves the Robot to a previously defined endpoint, as saved in the XYZTable singleton instance.
Throws:
thrown - if an error occurs attempting to execute the command.
Overrides:
Execute in class Command