public class TLcdAngleUnit extends Object implements Serializable, ILcdISO19103UnitOfMeasure
Modifier and Type | Field and Description |
---|---|
static TLcdAngleUnit |
DEGREE
Constant defining angle as degrees (1° = 1/360 of a circle).
|
static TLcdAngleUnit |
GRADIAN
Constant defining angle as gradians (1 gon = 1/400 of a circle).
|
static TLcdAngleUnit |
MIL
Constant defining the angle in angular mils as defined by NATO (1/6400 of a circle).
|
static TLcdAngleUnit |
RADIAN
Constant defining angle as radians (1 rad = 1/(2Π) of a circle).
|
Constructor and Description |
---|
TLcdAngleUnit(String aUnitName,
String aUnitShortName,
double aToRadianFactor)
Constructs a new angle unit.
|
Modifier and Type | Method and Description |
---|---|
static void |
addAngleUnit(TLcdAngleUnit aAngleUnit)
Adds the specified angle unit to the set of angle units which are registered for this
JVM session.
|
double |
convertFromStandard(double aValue)
Converts the value expressed in radians to this unit.
|
double |
convertToStandard(double aValue)
Converts the value expressed in this unit to radians.
|
boolean |
equals(Object aO) |
static TLcdAngleUnit[] |
getAllAngleUnits()
Returns the available angle units to consider in a JVM session.
|
TLcdISO19103MeasureTypeCode |
getMeasureType()
The type of measure this unit of measure is used for.
|
String |
getNameOfStandardUnit()
The name of the standard unit for this type of measures.
|
double |
getToRadianFactor()
Returns the factor to apply to convert an angle expressed in that specific unit into an angle
in radians.
|
String |
getUnitName()
Returns the name of this
TLcdAngleUnit (e.g. Radians, Degrees, Gradians). |
String |
getUnitShortName()
Returns the short name of this
TLcdAngleUnit (e.g. rad, deg,gr). |
String |
getUOMName()
The name of the unit of measure
|
String |
getUOMSymbol()
The symbol used for the unit of measure
|
int |
hashCode() |
static void |
removeAngleUnit(TLcdAngleUnit aAngleUnit)
Removes the specified angle unit from the set of angle units which are registered for this
JVM session.
|
static void |
setAllAngleUnits(TLcdAngleUnit[] aAngleUnits)
Sets statically all
TLcdAngleUnit s to consider in a JVM session. |
String |
toString()
Returns the unit name.
|
public static final TLcdAngleUnit RADIAN
TLcdUnitOfMeasureFactory.ANGLE_RADIAN
.public static final TLcdAngleUnit DEGREE
TLcdUnitOfMeasureFactory.ANGLE_DEGREE
.public static final TLcdAngleUnit GRADIAN
TLcdUnitOfMeasureFactory.ANGLE_GRADIAN
.public static final TLcdAngleUnit MIL
TLcdUnitOfMeasureFactory.ANGLE_MIL
.public TLcdAngleUnit(String aUnitName, String aUnitShortName, double aToRadianFactor)
aUnitName
- The name of the unit.aUnitShortName
- The short name of the unit, typically used as the suffix after a number.aToRadianFactor
- The factor to convert a value expressed in this unit to radians. For example,
if the unit is degrees, the factor is 2*Math.PI/360
.public String getUnitName()
TLcdAngleUnit
(e.g. Radians, Degrees, Gradians).TLcdAngleUnit
(e.g. Radians, Degrees, Gradians).public String getUnitShortName()
TLcdAngleUnit
(e.g. rad, deg,gr).TLcdAngleUnit
(e.g. rad, deg,gr).public double getToRadianFactor()
public static TLcdAngleUnit[] getAllAngleUnits()
setAllAngleUnits(TLcdAngleUnit[])
public static void setAllAngleUnits(TLcdAngleUnit[] aAngleUnits)
TLcdAngleUnit
s to consider in a JVM session. Typically, this
method should be called in the main of the application.aAngleUnits
- the angle units to consider in a JVM session.getAllAngleUnits()
public static void addAngleUnit(TLcdAngleUnit aAngleUnit)
aAngleUnit
- an angle unit to be registered for this JVM session.IllegalArgumentException
- If a angle unit with the same symbol was already registered before.public static void removeAngleUnit(TLcdAngleUnit aAngleUnit)
aAngleUnit
- an angle unit to be removed for this JVM session.IllegalArgumentException
- If the specified angle unit is not contained in the list of
registered angle units.public String toString()
public String getUOMName()
ILcdISO19103UnitOfMeasure
getUOMName
in interface ILcdISO19103UnitOfMeasure
public String getUOMSymbol()
ILcdISO19103UnitOfMeasure
getUOMSymbol
in interface ILcdISO19103UnitOfMeasure
public TLcdISO19103MeasureTypeCode getMeasureType()
ILcdISO19103UnitOfMeasure
getMeasureType
in interface ILcdISO19103UnitOfMeasure
TLcdISO19103MeasureTypeCode.ANGLE
.public String getNameOfStandardUnit()
ILcdISO19103UnitOfMeasure
getNameOfStandardUnit
in interface ILcdISO19103UnitOfMeasure
public double convertToStandard(double aValue)
convertToStandard
in interface ILcdISO19103UnitOfMeasure
aValue
- a angle expressed in this unit.public double convertFromStandard(double aValue)
convertFromStandard
in interface ILcdISO19103UnitOfMeasure
aValue
- a angle expressed in radians.