faa.tg.units
Class DistanceUnits

java.lang.Object
  extended by faa.tg.units.AUnits
      extended by faa.tg.units.DistanceUnits
All Implemented Interfaces:
java.io.Serializable

public class DistanceUnits
extends AUnits

 DistanceUnits represents the object for measuring units of distance.
 
See the source: DistanceUnits.java

See section 5.6 of the Detailed Design Document for a discussion of design issues.

Version:
$Id: DistanceUnits.java,v 3.1 2006/03/14 16:00:04 samf Exp $
Author:
Tim Kimmet (modeled after Robert G. Oliver's Units Classes)
See Also:
AUnits, AMeasure, Units.m, Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
 
Constructor Summary
protected DistanceUnits(double theValue, DistanceUnits theUnits, java.lang.String fullName, java.lang.String shortName)
          This constructor specifies units other than the canonical units.
protected DistanceUnits(java.lang.String fullName, java.lang.String shortName)
          This constructor specifies the canonical units.
 
Method Summary
 
Methods inherited from class faa.tg.units.AUnits
abbr, convertFromCanonical, convertToCanonical, getCanonicalUnit, getUnitClass, name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
Constructor Detail

DistanceUnits

protected DistanceUnits(java.lang.String fullName,
                        java.lang.String shortName)
This constructor specifies the canonical units. These are the units that AMeasure.itsValue is actually stored in.

example: MassUnits kg = new MassUnits("kilograms","kg");

Parameters:
fullName - the full name of the units (ex. "kilometers")
shortName - the abreviated name of the units (ex. "km")

DistanceUnits

protected DistanceUnits(double theValue,
                        DistanceUnits theUnits,
                        java.lang.String fullName,
                        java.lang.String shortName)
This constructor specifies units other than the canonical units. Other units must be specified in terms of either the canonical units or other previously specified units.

example: MassUnits mg = new MassUnits(1000.0, kilograms,"miligrams","mg");

Parameters:
theValue - value of new units in terms of specified units
theUnits - the specified units
fullName - the full name of the units (ex. "kilometers")
shortName - the abreviated name of the units (ex. "km")