Class MoveXYZCommand

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

public class MoveXYZCommand
extends Command

A class that encapsulates a command to move the Robot's end effector to a given coordinate. 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
MoveXYZCommand(int lineNumber, double x, double y, double z)
          Creates a new MoveXYZCommand, which will move the Robot's endpoint to the given destination coordinates.
 
Method Summary
 void Execute()
          Executes the Command's function.
 
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

MoveXYZCommand

public MoveXYZCommand(int lineNumber,
                      double x,
                      double y,
                      double z)
Creates a new MoveXYZCommand, which will move the Robot's endpoint to the given destination coordinates.
Parameters:
lineNumber - the source line for this command.
x - the destination x-coordinate.
y - the destination y-coordinate.
z - the destination z-coordinate.
Method Detail

Execute

public void Execute()
             throws java.lang.Exception
Executes the Command's function. The SimulationEngine will call this method in order to activate the Command and effect change on either the Robot's state or the state of the simulation.
Throws:
thrown - if an error occurs attempting to execute the command.
Overrides:
Execute in class Command