public class TLcdSpeedUnit extends Object implements ILcdISO19103UnitOfMeasure
Modifier and Type | Field and Description |
---|---|
static TLcdSpeedUnit |
FL_S
Constant defining speed as flight level/second.
|
static TLcdSpeedUnit |
Ft_M
Constant defining speed as feet/minute.
|
static TLcdSpeedUnit |
KmH
Constant defining speed as kilometer/hour.
|
static TLcdSpeedUnit |
KNT
Constant defining speed as knots.
|
static TLcdSpeedUnit |
Mach
Constant defining speed relative the speed of sound (at a temperature of 15 degrees Celsius and at sea level).
|
static TLcdSpeedUnit |
MPH
Constant defining speed as miles/hour.
|
static TLcdSpeedUnit |
MS
Constant defining speed as meter/second.
|
static TLcdSpeedUnit |
NM_S
Constant defining speed as nautical mile/second.
|
Constructor and Description |
---|
TLcdSpeedUnit(String aUnitName,
String aUnitShortName,
double aToMeterPerSecondFactor)
Constructs a new speed unit.
|
Modifier and Type | Method and Description |
---|---|
static void |
addSpeedUnit(TLcdSpeedUnit aSpeedUnit)
Adds the specified speed unit to the set of speed units which are registered for this
JVM session.
|
double |
convertFromStandard(double aValue)
Converts the value expressed in meters per second to this unit.
|
double |
convertToStandard(double aValue)
Converts the value expressed in this unit to meters per second.
|
boolean |
equals(Object aO) |
static TLcdSpeedUnit[] |
getAllSpeedUnits() |
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 |
getToMeterPerSecondFactor()
Returns the factor to convert a value expressed in this unit to meters/second.
|
String |
getUnitName() |
String |
getUnitShortName() |
String |
getUOMName()
The name of the unit of measure
|
String |
getUOMSymbol()
The symbol used for the unit of measure
|
int |
hashCode() |
static void |
removeSpeedUnit(TLcdSpeedUnit aSpeedUnit)
Removes the specified speed unit from the set of speed units which are registered for this
JVM session.
|
static void |
setAllSpeedUnits(TLcdSpeedUnit[] aSpeedUnits) |
String |
toString() |
public static final TLcdSpeedUnit MS
TLcdUnitOfMeasureFactory.SPEED_METRE_SECOND
.public static final TLcdSpeedUnit NM_S
TLcdUnitOfMeasureFactory.SPEED_NAUTICAL_MILE_SECOND
.public static final TLcdSpeedUnit Ft_M
TLcdUnitOfMeasureFactory.SPEED_FEET_MINUTE
.public static final TLcdSpeedUnit FL_S
TLcdUnitOfMeasureFactory.SPEED_FLIGHT_LEVEL_SECOND
.public static final TLcdSpeedUnit KmH
TLcdUnitOfMeasureFactory.SPEED_KILOMETRE_HOUR
.public static final TLcdSpeedUnit Mach
TLcdUnitOfMeasureFactory.SPEED_MACH
.public static final TLcdSpeedUnit MPH
TLcdUnitOfMeasureFactory.SPEED_MILES_HOUR
.public static final TLcdSpeedUnit KNT
TLcdUnitOfMeasureFactory.SPEED_KNOTS
.public TLcdSpeedUnit(String aUnitName, String aUnitShortName, double aToMeterPerSecondFactor)
aUnitName
- The name of the unit.aUnitShortName
- The short name of the unit, typically used as the suffix after a number.aToMeterPerSecondFactor
- The factor to convert a value expressed in this unit to
metres/second. For example, if the unit is km/h, the factor is 1000/3600=0.2777
.public String getUnitName()
public String getUnitShortName()
public double getToMeterPerSecondFactor()
1000/3600=0.2777
.public static TLcdSpeedUnit[] getAllSpeedUnits()
public static void setAllSpeedUnits(TLcdSpeedUnit[] aSpeedUnits)
public static void addSpeedUnit(TLcdSpeedUnit aSpeedUnit)
aSpeedUnit
- a speed unit to be registered for this JVM session.IllegalArgumentException
- If a speed unit with the same symbol was already registered before.public static void removeSpeedUnit(TLcdSpeedUnit aSpeedUnit)
aSpeedUnit
- a speed unit to be removed for this JVM session.IllegalArgumentException
- If the specified speed unit is not contained in the list of
registered speed units.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.VELOCITY
.public String getNameOfStandardUnit()
ILcdISO19103UnitOfMeasure
getNameOfStandardUnit
in interface ILcdISO19103UnitOfMeasure
public double convertToStandard(double aValue)
convertToStandard
in interface ILcdISO19103UnitOfMeasure
aValue
- a speed expressed in this unit.public double convertFromStandard(double aValue)
convertFromStandard
in interface ILcdISO19103UnitOfMeasure
aValue
- a speed expressed in meters per second.