|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.datatypes.Altitude
public class Altitude
Defines an altitude. The units are assumed to be feet, but no calculations rely on this. It allows negative values to support delta values.
| Field Summary | |
|---|---|
private double |
_altitude
the altitude |
private static double |
DEFAULT_ALTITUDE
the default altitude |
| Constructor Summary | |
|---|---|
Altitude()
Creates an altitude object with a default value of zero. |
|
Altitude(double altitude)
Creates an altitude object. |
|
| Method Summary | |
|---|---|
Altitude |
add_(Altitude altitude)
Adds another unit to this one. |
int |
compareTo(Altitude altitude)
|
double |
getValue_()
Returns the numerical value of this unit. |
private void |
setValue(double altitude)
Sets the altitude. |
Altitude |
subtract_(Altitude altitude)
Subtract another unit from this one. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private double _altitude
private static final double DEFAULT_ALTITUDE
| Constructor Detail |
|---|
public Altitude()
public Altitude(double altitude)
altitude - - the altitude in feet| Method Detail |
|---|
public Altitude add_(Altitude altitude)
add_ in interface I_Unitable<Altitude>altitude - - the unit
public int compareTo(Altitude altitude)
compareTo in interface java.lang.Comparable<Altitude>public double getValue_()
getValue_ in interface I_Unitable<Altitude>private void setValue(double altitude)
altitude - - the altitudepublic Altitude subtract_(Altitude altitude)
subtract_ in interface I_Unitable<Altitude>altitude - - the unit
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||