org.xspace.mx.physics.mutable
Class AstronomicalUnit
java.lang.Object
org.xspace.mx.physics.mutable.BaseUnit
org.xspace.mx.physics.mutable.AstronomicalUnit
- All Implemented Interfaces:
- Measurement, java.io.Serializable
- public class AstronomicalUnit
- extends BaseUnit
A Measurement representing an Astronomical Unit.
An Astronomical Unit is an approximate distance between the Earth and the Sun.
According to the Jet Propulsion Laboratory,
1 AU = 149,597,870.691 kilometers
- Since:
- 0.5
- See Also:
- Serialized Form
Constructor Summary |
AstronomicalUnit()
Creates a Measurement equal to one Astronomical Unit |
AstronomicalUnit(double value)
Creates a Measurement as a multiple of Astronomical Units |
Method Summary |
java.lang.String |
getAbbr()
An abbreviated description of the units of an Astronomical Unit |
java.lang.String |
getDescription()
A description of the units of an Astronomical Unit |
Methods inherited from class org.xspace.mx.physics.mutable.BaseUnit |
copy, div, div, getSystem, getSystemDimensions, getSystemValue, getValue, isSameMeasurementType, minus, mult, mult, plus, pow, root, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AstronomicalUnit
public AstronomicalUnit()
- Creates a Measurement equal to one Astronomical Unit
AstronomicalUnit
public AstronomicalUnit(double value)
- Creates a Measurement as a multiple of Astronomical Units
- Parameters:
value
- The number of Astronomical Units
getAbbr
public java.lang.String getAbbr()
- An abbreviated description of the units of an Astronomical Unit
- Specified by:
getAbbr
in interface Measurement
- Overrides:
getAbbr
in class BaseUnit
- Returns:
- The string "AU"
getDescription
public java.lang.String getDescription()
- A description of the units of an Astronomical Unit
- Specified by:
getDescription
in interface Measurement
- Overrides:
getDescription
in class BaseUnit
- Returns:
- The string "Astronomical Units"