faa.tg.aircraft
Class AcType

java.lang.Object
  extended by faa.tg.aircraft.AcType
All Implemented Interfaces:
java.io.Serializable

public class AcType
extends java.lang.Object
implements java.io.Serializable

 Defines an AcType (aircraft type) class: does not distinguish between the
 actual aircraft type imported from the flight plan (used by Flight) and
 the simulator's aircraft type equivalent that determines the flight
 characteristics to use (used by Aircraft).
 
See the source AcType.java

Version:
$Id: AcType.java,v 3.7 2008/12/01 13:37:20 samf Exp $
Author:
Dana N. Whicker, FAA/ACT-510, Mon May 22 2000
See Also:
faa.tg.filters.interfaces.HasAcType, Serialized Form

Field Summary
protected  java.lang.String acType
           
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
protected  AircraftEquipment equip
          Equipment code for the aircraft type, if available, or else null.
protected  char equipCode
          Deprecated. Keep for recordings made before May 10 2008
static java.lang.String SEPARATOR
           
(package private) static long serialVersionUID
           
 
Constructor Summary
AcType(java.lang.String acTypeStr)
          Constructor for an AcType that takes a String that should contain the UFP aircraft type, followed by a slash ('/'), followed by the navigation equipment type.
AcType(java.lang.String ufpAcType, java.lang.String navEquip)
          Constructor for an AcType that has a separate navigation type.
 
Method Summary
 char getEquipCode()
          Deprecated. use getEquipmentString instead
 AircraftEquipment getEquipment()
          Returns the equipment code if available, or else null.
 java.lang.String getEquipmentString()
           
private  void readObject(java.io.ObjectInputStream in)
          Read an object from the object input stream.
 java.lang.String toString()
          Returns the AcType (aircraft type) as a String.
private  void validate(java.lang.String acTypeStr)
          Validates the AcType (aircraft type identifier)
 
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

SEPARATOR

public static final java.lang.String SEPARATOR
See Also:
Constant Field Values

acType

protected java.lang.String acType

equipCode

protected char equipCode
Deprecated. Keep for recordings made before May 10 2008
Equipment code of the aircraft type, if available, or else ' '. This is always blank if the acType was from Aircraft.getAcType() or if from AircraftState.getAcType(), since those are only equivalency types.

See Also:
AircraftState.getUfpAcType(), Flight.getAcType(), FlightState.getAcType()

equip

protected AircraftEquipment equip
Equipment code for the aircraft type, if available, or else null.

See Also:
AircraftState.getUfpAcType(), Flight.getAcType(), FlightState.getAcType()
Constructor Detail

AcType

public AcType(java.lang.String ufpAcType,
              java.lang.String navEquip)
Constructor for an AcType that has a separate navigation type.

Parameters:
ufpAcType - The aircraft type from the UFP (Universal Flight Plan).
navEquip - The navigation equipment type from the UFP.

AcType

public AcType(java.lang.String acTypeStr)
Constructor for an AcType that takes a String that should contain the UFP aircraft type, followed by a slash ('/'), followed by the navigation equipment type.

Parameters:
acTypeStr - The aircraft type.
Method Detail

validate

private void validate(java.lang.String acTypeStr)
Validates the AcType (aircraft type identifier)

Parameters:
acType - The AcType (aircraft type) to validate.

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Read an object from the object input stream.

Parameters:
in - The object input stream to read.
Throws:
java.io.IOException - if an input/output error occurs
java.lang.ClassNotFoundException - if attempted to read an unknown class

getEquipCode

public char getEquipCode()
Deprecated. use getEquipmentString instead

Returns the equipment code character if available, or else ' '.

Returns:
Returns the equipment type as a one-character String or ' '.
See Also:
AircraftState.getUfpAcType(), Flight.getAcType(), FlightState.getAcType()

getEquipment

public AircraftEquipment getEquipment()
Returns the equipment code if available, or else null.

Returns:
Returns the equipment type as a one-character String or ' '.
See Also:
AircraftState.getUfpAcType(), Flight.getAcType(), FlightState.getAcType()

getEquipmentString

public java.lang.String getEquipmentString()

toString

public java.lang.String toString()
Returns the AcType (aircraft type) as a String.

Overrides:
toString in class java.lang.Object
Returns:
Returns the AcType (aircraft type) in string format.