faa.tg.sp.cmd
Class AirportCmd

java.lang.Object
  extended by faa.tg.sp.SpCommand
      extended by faa.tg.sp.SpAlphaCommand
          extended by faa.tg.sp.cmd.AirportCmd
All Implemented Interfaces:
HasSpCmd, java.io.Serializable

public class AirportCmd
extends SpAlphaCommand

 Assigns a new airport as the aircraft's destination.  A default runway
 for the specified airport is also assigned to the aircraft.
 The general format of the aircraft command is: "AAL1123 apt den".
 
See the source: AirportCmd.java

Version:
$Id: AirportCmd.java,v 3.8 2008/12/05 22:48:45 lykensj Exp $
Author:
Nick M., Timothy Swantek
See Also:
Serialized Form

Field Summary
private  Airport apt
          Deprecated.  
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  java.lang.String desiredAptName
           
(package private) static long serialVersionUID
           
 
Constructor Summary
AirportCmd(java.lang.String cmd, java.util.StringTokenizer st, CommandLineSource source)
          Constructor for the command.
 
Method Summary
 SpCommandResult execute(Aircraft ac, java.util.List<SpCommand> cmdList)
          Executes the constructed command.
 java.lang.String getAirport()
           
 SpCmdType getSpCmdType()
          Returns the type of this simpilot command as an SpCmdType.
static java.lang.String getUsage()
          Returns the proper usage of this command as a String.
 
Methods inherited from class faa.tg.sp.SpCommand
getCmd, getCmdLine, getSource, setCmdLine, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

apt

private final transient Airport apt
Deprecated. 

desiredAptName

private java.lang.String desiredAptName
Constructor Detail

AirportCmd

public AirportCmd(java.lang.String cmd,
                  java.util.StringTokenizer st,
                  CommandLineSource source)
Constructor for the command.

Parameters:
cmd - The cmd word.
st - The rest of the command line in tokenizer format.
source - The object that created the command.
Method Detail

getSpCmdType

public SpCmdType getSpCmdType()
Returns the type of this simpilot command as an SpCmdType.


getUsage

public static java.lang.String getUsage()
Returns the proper usage of this command as a String.


execute

public SpCommandResult execute(Aircraft ac,
                               java.util.List<SpCommand> cmdList)
Executes the constructed command.

Specified by:
execute in class SpCommand
Parameters:
ac - The Aircraft the command is for, or null.
cmdList - The list of simpilot commands.
Returns:
The result of execution as a SpCommandResult.

getAirport

public java.lang.String getAirport()