public class SpeedUnit extends Unit<SpeedUnit>
Copyright (c) 2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Field and Description |
---|---|
static SpeedUnit |
FOOT_PER_SECOND
ft/s.
|
static SpeedUnit |
KM_PER_HOUR
km/h.
|
static SpeedUnit |
KNOT
knot.
|
static SpeedUnit |
METER_PER_SECOND
m/s.
|
static SpeedUnit |
MILE_PER_HOUR
mile/h.
|
static SpeedUnit |
SI
The SI unit for velocity is m/s.
|
Constructor and Description |
---|
SpeedUnit(LengthUnit lengthUnit,
TimeUnit timeUnit,
String nameKey,
String abbreviationKey,
UnitSystem unitSystem)
Build a speed unit from a length unit and a time unit.
|
SpeedUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem,
SpeedUnit referenceUnit,
double conversionFactorToReferenceUnit)
Build a speed unit based on another speed unit.
|
Modifier and Type | Method and Description |
---|---|
LengthUnit |
getLengthUnit() |
String |
getSICoefficientsString() |
SpeedUnit |
getStandardUnit() |
TimeUnit |
getTimeUnit() |
getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public static final SpeedUnit SI
public static final SpeedUnit METER_PER_SECOND
public static final SpeedUnit KM_PER_HOUR
public static final SpeedUnit MILE_PER_HOUR
public static final SpeedUnit FOOT_PER_SECOND
public static final SpeedUnit KNOT
public SpeedUnit(LengthUnit lengthUnit, TimeUnit timeUnit, String nameKey, String abbreviationKey, UnitSystem unitSystem)
lengthUnit
- the unit of length for the speed unit, e.g., metertimeUnit
- the unit of time for the speed unit, e.g., secondnameKey
- the key to the locale file for the long name of the unitabbreviationKey
- the key to the locale file for the abbreviation of the unitunitSystem
- the unit system, e.g. SI or Imperialpublic SpeedUnit(String nameKey, String abbreviationKey, UnitSystem unitSystem, SpeedUnit referenceUnit, double conversionFactorToReferenceUnit)
nameKey
- the key to the locale file for the long name of the unitabbreviationKey
- the key to the locale file for the abbreviation of the unitunitSystem
- the unit system, e.g. SI or ImperialreferenceUnit
- the unit to convert toconversionFactorToReferenceUnit
- multiply a value in this unit by the factor to convert to the given
reference unitpublic final LengthUnit getLengthUnit()
public final TimeUnit getTimeUnit()
public final SpeedUnit getStandardUnit()
getStandardUnit
in class Unit<SpeedUnit>
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<SpeedUnit>
Copyright © 2014–2015 Delft University of Technology. All rights reserved.