public class LengthUnit extends Unit<LengthUnit>
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 LengthUnit |
CENTIMETER
centimeter.
|
static LengthUnit |
DECIMETER
decimeter.
|
static LengthUnit |
DEKAMETER
decameter.
|
static LengthUnit |
FOOT
foot (international) = 0.3048 m = 1/3 yd = 12 inches.
|
static LengthUnit |
HECTOMETER
hectometer.
|
static LengthUnit |
INCH
inch (international) = 2.54 cm = 1/36 yd = 1/12 ft.
|
static LengthUnit |
KILOMETER
kilometer.
|
static LengthUnit |
METER
meter.
|
static LengthUnit |
MILE
mile (international) = 5280 ft = 1760 yd.
|
static LengthUnit |
MILLIMETER
millimeter.
|
static LengthUnit |
NAUTICAL_MILE
nautical mile (international) = 1852 m.
|
static LengthUnit |
SI
The SI unit for length is meter.
|
static LengthUnit |
YARD
yard (international) = 0.9144 m = 3 ft = 36 in.
|
Constructor and Description |
---|
LengthUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem)
Build a standard unit.
|
LengthUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem,
LengthUnit referenceUnit,
double conversionFactorToReferenceUnit)
Build a unit with a conversion factor to another unit.
|
Modifier and Type | Method and Description |
---|---|
String |
getSICoefficientsString() |
LengthUnit |
getStandardUnit() |
getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public static final LengthUnit SI
public static final LengthUnit METER
public static final LengthUnit MILLIMETER
public static final LengthUnit CENTIMETER
public static final LengthUnit DECIMETER
public static final LengthUnit DEKAMETER
public static final LengthUnit HECTOMETER
public static final LengthUnit KILOMETER
public static final LengthUnit FOOT
public static final LengthUnit INCH
public static final LengthUnit MILE
public static final LengthUnit NAUTICAL_MILE
public static final LengthUnit YARD
public LengthUnit(String nameKey, String abbreviationKey, UnitSystem unitSystem)
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 Imperialpublic LengthUnit(String nameKey, String abbreviationKey, UnitSystem unitSystem, LengthUnit 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 getStandardUnit()
getStandardUnit
in class Unit<LengthUnit>
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<LengthUnit>
Copyright © 2014–2015 Delft University of Technology. All rights reserved.