|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.units.AMeasure
faa.tg.units.Weight
public class Weight
Weight class defines the objects used to quantify a weight measurement.
See section 5.6 of the Detailed Design Document for a discussion
of design issues.
See the source: Weight.java
Units.lbs,
AUnits,
AMeasure,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
(package private) static long |
serialVersionUID
|
static Weight |
ZERO
|
| Fields inherited from class faa.tg.units.AMeasure |
|---|
DEC0, DEC0_, DEC00, DEC000, DEC1, DEC1_, DEC12, DEC12_, DEC1L, DEC1L_, DEC2, DEC2_, DEC3, DEC3_, DEC4, DEC4_, DEC5, DEC5_, DEC6, DEC6_, DEC7, DEC7_, DEC9, DEC9_, itsValue, TIME_FRACTION |
| Constructor Summary | |
|---|---|
Weight(double theValue,
WeightUnits theUnits)
Constructor for the Weight class |
|
| Method Summary | |
|---|---|
Weight |
add(Weight theMeasure)
This summation method adds a value with like units. |
double |
as(WeightUnits theUnits)
The as method extracts the value from a Measure in specified units. |
Weight |
sub(Weight theMeasure)
This subtraction method subtracts a value with like units. |
java.lang.String |
toString()
returns the String representation of this object in its canonical form. |
| Methods inherited from class faa.tg.units.AMeasure |
|---|
absoluteValue, add, as, as, clone, compareTo, debug, div, eq, equals, ge, getAUnit, getCanonicalUnit, getCanonicalValue, getInitialUnit, getUnitClass, gt, hashCode, isBetween, le, lt, mul, ratio, sub, toAMeasure, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
public static final Weight ZERO
| Constructor Detail |
|---|
public Weight(double theValue,
WeightUnits theUnits)
theValue - the magnitude of Weight as a double.theUnits - the units of the value that will be stored (ex: lbs).| Method Detail |
|---|
public Weight add(Weight theMeasure)
theMeasure - the unit of measure you wish to add to this measure.
public Weight sub(Weight theMeasure)
theMeasure - the unit of measure you wish to add to this measure.
public double as(WeightUnits theUnits)
theUnits - the units of the value that will be returned (ex: km)
public java.lang.String toString()
public static DistanceUnits meters =
new DistanceUnits("meters","m");
See the Units class for more details.
toString in class AMeasureUnits
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||