Class DefineNamedXYZCommand

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

public class DefineNamedXYZCommand
extends Command

A class that encapsulates a command to define a named endpoint and save it in the simulation, for use at a later time in the simulation. 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
DefineNamedXYZCommand(int lineNumber, java.lang.String name, double x, double y, double z)
          Creates a new DefineNamedXYZCommand, which will associate a name with an endpoint in the simulation.
 
Method Summary
 void Execute()
          Associates a name with the given endpoint coordinates, using 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

DefineNamedXYZCommand

public DefineNamedXYZCommand(int lineNumber,
                             java.lang.String name,
                             double x,
                             double y,
                             double z)
Creates a new DefineNamedXYZCommand, which will associate a name with an endpoint in the simulation.
Parameters:
lineNumber - the source line for this command.
name - the name for the endpoint.
x - the x-coordinate of the endpoint.
y - the y-coordinate of the endpoint.
z - the z-coordinate of the endpoint.
Method Detail

Execute

public void Execute()
             throws java.lang.Exception
Associates a name with the given endpoint coordinates, using the XYZTable singleton instance.
Throws:
thrown - if an error occurs attempting to execute the command.
Overrides:
Execute in class Command