faa.tg.units
Class Coordinate

java.lang.Object
  extended by faa.tg.units.Coordinate
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DesireeSysCoordinate, NasSysCoordinate

public class Coordinate
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

 A class representing a Coordinate Pair or Point using Distances for the
 Axis Measure.
 
See the source: Coordinate.java

Version:
$Id: Coordinate.java,v 3.7 2008/12/11 17:54:48 lonnies Exp $
See Also:
Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
(package private)  Distance xCoordinate
           
(package private)  Distance yCoordinate
           
 
Constructor Summary
Coordinate(Distance xCoordinate, Distance yCoordinate)
          Constructor for Coordinate.
 
Method Summary
 Coordinate add(Coordinate theCoordinate)
           Returns the sum of the coordinates.
 java.lang.Object clone()
          Clone a Coordinate
 Distance getXCoordinate()
          Returns the value of this Coordinate as a Distance.
 double getXCoordinate(DistanceUnits distanceUnits)
          Returns the value of this Coordinate as a double.
 Distance getYCoordinate()
          Returns the value of this Coordinate as a Distance.
 double getYCoordinate(DistanceUnits distanceUnits)
          Returns the value of this Coordinate as a double.
 Coordinate mul(double aMultplier)
           
 Coordinate rotate(Angle angle)
          Rotates the coordinate (point pair) by given angle in the counterclockwise direction about (0,0).
 Coordinate rotateAll(Angle angle)
           
 Coordinate sub(Coordinate theCoordinate)
           Returns the difference of the coordinates.
 java.awt.geom.Point2D toPoint2D(DistanceUnits units)
           
 java.lang.String toString()
          Return the String representation of this object StringBuilder is used for efficiency.
 Coordinate translate(Coordinate offsets)
          Translates this Coordinate using the offsets given by the argument.
 
Methods inherited from class java.lang.Object
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

xCoordinate

Distance xCoordinate

yCoordinate

Distance yCoordinate
Constructor Detail

Coordinate

public Coordinate(Distance xCoordinate,
                  Distance yCoordinate)
Constructor for Coordinate.

Parameters:
xCoordinate -
yCoordinate -
Method Detail

getXCoordinate

public Distance getXCoordinate()
Returns the value of this Coordinate as a Distance.

Returns:
the value of this Coordinate as a Distance.

getXCoordinate

public double getXCoordinate(DistanceUnits distanceUnits)
Returns the value of this Coordinate as a double.

Parameters:
distanceUnits -
Returns:
the value of this coordinate as a double.

getYCoordinate

public Distance getYCoordinate()
Returns the value of this Coordinate as a Distance.

Returns:
the value of this Coordinate as a Distance.

getYCoordinate

public double getYCoordinate(DistanceUnits distanceUnits)
Returns the value of this Coordinate as a double.

Parameters:
distanceUnits -
Returns:
the value of this coordinate as a double.

add

public Coordinate add(Coordinate theCoordinate)
  Returns the sum of the coordinates.

     (xn,xy) = (x1,y1) + (x2,y2) = (x1 + x2,  y1 + y2)
  

Parameters:
theCoordinate -
Returns:
New Coordinate with the values of the sums of the coordinates.

rotate

public Coordinate rotate(Angle angle)
Rotates the coordinate (point pair) by given angle in the counterclockwise direction about (0,0).

Parameters:
angle, - the Angle to rotate by.
Returns:
a new, rotated, Coordinate

rotateAll

public Coordinate rotateAll(Angle angle)

translate

public Coordinate translate(Coordinate offsets)
Translates this Coordinate using the offsets given by the argument.

Parameters:
other, - the Coordinate consisting of the offsets to translate b
Returns:
the new, translated, Coordinate.

sub

public Coordinate sub(Coordinate theCoordinate)
  Returns the difference of the coordinates.

     (xn,xy) = (x1,y1) - (x2,y2) = (x1 - x2,  y1 - y2)
  

Parameters:
theCoordinate - is the (x2,y2) coordinate
Returns:
New Coordinate with values of the differences of the coordinates.

clone

public java.lang.Object clone()
Clone a Coordinate

Overrides:
clone in class java.lang.Object
Returns:
Coordinate value.

toString

public java.lang.String toString()
Return the String representation of this object StringBuilder is used for efficiency.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of this Object.

mul

public Coordinate mul(double aMultplier)

toPoint2D

public java.awt.geom.Point2D toPoint2D(DistanceUnits units)