|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jeospace.measure.Temperature
An object that represents a measure of temperature.
For reference see: http://ts.nist.gov/ts/htdocs/230/235/h4402/appenc.pdf
TemperatureUnit| Field Summary | |
protected double |
magnitude
The magnitude |
protected TemperatureUnit |
units
The units |
| Constructor Summary | |
Temperature()
Construct a Temperature object initialized to a value
of 0 degrees Celsius. |
|
Temperature(double magnitude,
TemperatureUnit units)
Construct a Temperature object. |
|
| Method Summary | |
void |
add(Temperature temperature)
Add to this object the argument Temperature object. |
void |
clear()
Set the value of this Temperature object to 0 degrees Celsius. |
java.lang.Object |
clone()
Return a copy of this Temperature object. |
int |
compareTo(java.lang.Object obj)
Compare this object with the argument for order. |
int |
compareTo(Temperature that)
Compare this object with the argument for order. |
boolean |
equals(java.lang.Object obj)
Compare two Temperatures for equality. |
double |
getMagnitude(TemperatureUnit inUnits)
Return the double value of the magnitude of this Temperature
object in the specified units. |
void |
set(double inMagnitude,
TemperatureUnit inUnits)
Set this Temperature object to the specified value. |
void |
subtract(Temperature temperature)
Subtract from this object the argument Temperature object. |
java.lang.String |
toString()
Return a String representation of this Temperature object. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double magnitude
protected TemperatureUnit units
| Constructor Detail |
public Temperature()
Temperature object initialized to a value
of 0 degrees Celsius.
public Temperature(double magnitude,
TemperatureUnit units)
Temperature object.
magnitude - the magnitude value.units - the units identifier.| Method Detail |
public void set(double inMagnitude,
TemperatureUnit inUnits)
Temperature object to the specified value.
inMagnitude - The magnitude value.inUnits - The units identifier.public void add(Temperature temperature)
Temperature object.
temperature - A Temperature object.public void subtract(Temperature temperature)
Temperature object.
temperature - A Temperature object.public double getMagnitude(TemperatureUnit inUnits)
double value of the magnitude of this Temperature
object in the specified units.
inUnits - The units identifier.
double value of the magnitudepublic void clear()
Temperature object to 0 degrees Celsius.
public java.lang.Object clone()
Temperature object. Overrides Cloneable.
Temperature object.public boolean equals(java.lang.Object obj)
Temperatures for equality. The result is true
if and only if the argument object is not null, is a Temperature object
and represents a temperature of the same magnitude as this Temperature.
Two Temperature objects are equal only if the getMagnitude
method returns the same value for both with identical unit identifiers.
obj - The object to compare with
true if the Lengths are equivalent;
false otherwise.public java.lang.String toString()
Temperature object.
Temperature objectpublic int compareTo(Temperature that)
that - The Temperature to compare
public int compareTo(java.lang.Object obj)
obj - The Object to compare
ClassCastException - if the argument is not a
Temperature.
|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||