faa.tg.pointmodel
Class PointModel

java.lang.Object
  extended by faa.tg.pointmodel.PointModel
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FixedPointModel, FreeBodyModel

public abstract class PointModel
extends java.lang.Object
implements java.io.Serializable

 The PointModel abstracts the common attribute of position for all objects
 whose position will be represented as a single point.
 See the source: PointModel.java
 

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

Version:
$Id: PointModel.java,v 3.2 2008/10/20 16:23:13 lykensj Exp $
Author:
Tim Kimmet
See Also:
FixedPointModel, Position, Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  Position position
          Position is the three dimensional location of the PointModel object.
(package private) static long serialVersionUID
           
 
Constructor Summary
PointModel(Position pos)
          Constructor
 
Method Summary
protected  PointModel clone()
          Creates a new object of the same class as this object.
 Position getPosition()
          Returns the position field of this object.
 void setPosition(Position newPosition)
          replaces the current Position with this Position
 java.lang.String toString()
          Returns a string representation of this object.
 
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

position

private Position position
Position is the three dimensional location of the PointModel object.

Constructor Detail

PointModel

public PointModel(Position pos)
Constructor

Parameters:
pos - Position of the object
Method Detail

getPosition

public Position getPosition()
Returns the position field of this object.

Returns:
Position - a true copy of the Position

setPosition

public void setPosition(Position newPosition)
replaces the current Position with this Position

Parameters:
newPosition - the new Position which replaces the current Position

clone

protected PointModel clone()
                    throws java.lang.CloneNotSupportedException
Creates a new object of the same class as this object. It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No constructor is called.

The clone method of class PointModel will only clone an object whose class indicates that it is willing for its instances to be cloned. A class indicates that its instances can be cloned by declaring that it implements the Cloneable interface.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
java.lang.OutOfMemoryError - if there is not enough memory.
See Also:
Cloneable

toString

public java.lang.String toString()
Returns a string representation of this object. In general, the toString method returns a String that "textually represents" this object.

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