public class MassUnit extends Unit<MassUnit>
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 MassUnit |
DALTON
dalton.
|
static MassUnit |
ELECTRONVOLT
electronvolt via E=mc^2.
|
static MassUnit |
GRAM
gram.
|
static MassUnit |
KILOGRAM
kilogram.
|
static MassUnit |
OUNCE
pound.
|
static MassUnit |
POUND
pound.
|
static MassUnit |
SI
The SI unit for mass is kilogram.
|
static MassUnit |
TON_LONG
long ton = 2240 lb.
|
static MassUnit |
TON_METRIC
metric ton = 1000 kg.
|
static MassUnit |
TON_SHORT
short ton = 2000 lb.
|
static MassUnit |
TONNE
metric ton = 1000 kg.
|
| Constructor and Description |
|---|
MassUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem)
Build a standard unit.
|
MassUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem,
MassUnit referenceUnit,
double conversionFactorToReferenceUnit)
Build a unit with a conversion factor to another unit.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSICoefficientsString() |
MassUnit |
getStandardUnit() |
getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toStringpublic static final MassUnit SI
public static final MassUnit KILOGRAM
public static final MassUnit GRAM
public static final MassUnit POUND
public static final MassUnit OUNCE
public static final MassUnit TON_LONG
public static final MassUnit TON_SHORT
public static final MassUnit TON_METRIC
public static final MassUnit TONNE
public static final MassUnit ELECTRONVOLT
public static final MassUnit DALTON
public MassUnit(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 MassUnit(String nameKey, String abbreviationKey, UnitSystem unitSystem, MassUnit 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 MassUnit getStandardUnit()
getStandardUnit in class Unit<MassUnit>public final String getSICoefficientsString()
getSICoefficientsString in class Unit<MassUnit>Copyright © 2014–2015 Delft University of Technology. All rights reserved.