Package com.luciad.util
Class TLcdSpeedUnit
java.lang.Object
com.luciad.util.TLcdSpeedUnit
- All Implemented Interfaces:
ILcdISO19103UnitOfMeasure
This class defines speed unit constants. The standard unit
is 'meter/second'.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TLcdSpeedUnit
Constant defining speed as flight level/second.static final TLcdSpeedUnit
Constant defining speed as feet/minute.static final TLcdSpeedUnit
Constant defining speed as kilometer/hour.static final TLcdSpeedUnit
Constant defining speed as knots.static final TLcdSpeedUnit
Constant defining speed relative the speed of sound (at a temperature of 15 degrees Celsius and at sea level).static final TLcdSpeedUnit
Constant defining speed as miles/hour.static final TLcdSpeedUnit
Constant defining speed as meter/second.static final TLcdSpeedUnit
Constant defining speed as nautical mile/second. -
Constructor Summary
ConstructorDescriptionTLcdSpeedUnit
(String aUnitName, String aUnitShortName, double aToMeterPerSecondFactor) Constructs a new speed unit. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
static TLcdSpeedUnit[]
The type of measure this unit of measure is used for.The name of the standard unit for this type of measures.double
Returns the factor to convert a value expressed in this unit to meters/second.The name of the unit of measureThe symbol used for the unit of measureint
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) toString()
-
Field Details
-
MS
Constant defining speed as meter/second. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_METRE_SECOND
. -
NM_S
Constant defining speed as nautical mile/second. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_NAUTICAL_MILE_SECOND
. -
Ft_M
Constant defining speed as feet/minute. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_FEET_MINUTE
. -
FL_S
Constant defining speed as flight level/second. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_FLIGHT_LEVEL_SECOND
. -
KmH
Constant defining speed as kilometer/hour. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_KILOMETRE_HOUR
. -
Mach
Constant defining speed relative the speed of sound (at a temperature of 15 degrees Celsius and at sea level). This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_MACH
. -
MPH
Constant defining speed as miles/hour. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_MILES_HOUR
.- Since:
- 2016.1.14
-
KNT
Constant defining speed as knots. This constant is an alias forTLcdUnitOfMeasureFactory.SPEED_KNOTS
.
-
-
Constructor Details
-
TLcdSpeedUnit
Constructs a new speed unit.- Parameters:
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 is1000/3600=0.2777
.
-
-
Method Details
-
getUnitName
-
getUnitShortName
-
getToMeterPerSecondFactor
public double getToMeterPerSecondFactor()Returns the factor to convert a value expressed in this unit to meters/second. For example, if the unit is km/h, the factor is1000/3600=0.2777
.- Returns:
- the factor to convert a value expressed in this unit to meters/second
-
getAllSpeedUnits
-
setAllSpeedUnits
-
addSpeedUnit
Adds the specified speed unit to the set of speed units which are registered for this JVM session.- Parameters:
aSpeedUnit
- a speed unit to be registered for this JVM session.- Throws:
IllegalArgumentException
- If a speed unit with the same symbol was already registered before.
-
removeSpeedUnit
Removes the specified speed unit from the set of speed units which are registered for this JVM session.- Parameters:
aSpeedUnit
- a speed unit to be removed for this JVM session.- Throws:
IllegalArgumentException
- If the specified speed unit is not contained in the list of registered speed units.
-
toString
-
getUOMName
Description copied from interface:ILcdISO19103UnitOfMeasure
The name of the unit of measure- Specified by:
getUOMName
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the name of the unit of measure
-
getUOMSymbol
Description copied from interface:ILcdISO19103UnitOfMeasure
The symbol used for the unit of measure- Specified by:
getUOMSymbol
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the symbol used for the unit of measure
-
getMeasureType
Description copied from interface:ILcdISO19103UnitOfMeasure
The type of measure this unit of measure is used for.- Specified by:
getMeasureType
in interfaceILcdISO19103UnitOfMeasure
- Returns:
TLcdISO19103MeasureTypeCode.VELOCITY
.
-
getNameOfStandardUnit
Description copied from interface:ILcdISO19103UnitOfMeasure
The name of the standard unit for this type of measures.- Specified by:
getNameOfStandardUnit
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the name of the standard unit for this type of measures.
-
convertToStandard
public double convertToStandard(double aValue) Converts the value expressed in this unit to meters per second.- Specified by:
convertToStandard
in interfaceILcdISO19103UnitOfMeasure
- Parameters:
aValue
- a speed expressed in this unit.- Returns:
- the same speed expressed in meters per second.
-
convertFromStandard
public double convertFromStandard(double aValue) Converts the value expressed in meters per second to this unit.- Specified by:
convertFromStandard
in interfaceILcdISO19103UnitOfMeasure
- Parameters:
aValue
- a speed expressed in meters per second.- Returns:
- the same speed expressed in this unit.
-
equals
-
hashCode
public int hashCode()
-