|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cts.units.Measure
public class Measure
| Constructor Summary | |
|---|---|
Measure(double value,
Unit unit)
Creates a new Measure. |
|
Measure(Number value,
Unit unit)
Creates a new Measure. |
|
Measure(Number value,
Unit unit,
double precision)
Creates a new Measure. |
|
| Method Summary | |
|---|---|
Measure |
convert(Unit unit)
Converts this measure to another unit. |
Unit |
getCompatibleUnit(Unit... units)
Get compatible Unit for this unit It uses after WKT parsing. |
double |
getPrecision()
Gets the precision of this measure. |
Quantity |
getQuantity()
Gets the Quantity measured. |
double |
getSValue()
Gets the value of this measure expressed as a double in the base unit. |
Unit |
getUnit()
Gets the unit of this measure. |
Number |
getValue()
Gets the value of this measure. |
void |
setUnit(Unit unit)
Set the unit of this measure. |
void |
setValue(Number value)
Set Value of this measure. |
Measure |
toBaseUnit()
Gets the same Measure using the base unit. |
String |
toString()
Returns the measure as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Measure(double value,
Unit unit)
value - the value of the measureunit - the unit used to express the measure
public Measure(Number value,
Unit unit)
value - the value of the measureunit - the unit used to express the measure
public Measure(Number value,
Unit unit,
double precision)
value - the value of the measureunit - the unit used to express the measureprecision - of this measure. If different from NaN, this parameter
can be used to express a limit in this measure precision for future
calculations.| Method Detail |
|---|
public double getSValue()
public Number getValue()
public void setValue(Number value)
value - the new Value to set to this Measurepublic Unit getUnit()
public void setUnit(Unit unit)
unit - the new Unit to set to this Measurepublic Quantity getQuantity()
public double getPrecision()
public Measure toBaseUnit()
public Measure convert(Unit unit)
throws IllegalArgumentException
unit - the new unit for the returned measure
IllegalArgumentExceptionpublic String toString()
toString in class Objectpublic Unit getCompatibleUnit(Unit... units)
units - : list of possible compatible Unit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||