public class DensityUnit extends Unit<DensityUnit>
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 DensityUnit |
GRAM_PER_CENTIMETER_3
g/cm^3.
|
static DensityUnit |
KG_PER_METER_3
kg/m^3.
|
static DensityUnit |
SI
The SI unit for standard density is kg/m^3.
|
| Constructor and Description |
|---|
DensityUnit(MassUnit massUnit,
LengthUnit lengthUnit,
String nameKey,
String abbreviationKey,
UnitSystem unitSystem)
Define density units based on mass and length.
|
DensityUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem,
DensityUnit referenceUnit,
double conversionFactorToReferenceUnit) |
| Modifier and Type | Method and Description |
|---|---|
LengthUnit |
getLengthUnit() |
MassUnit |
getMassUnit() |
String |
getSICoefficientsString() |
DensityUnit |
getStandardUnit() |
getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toStringpublic static final DensityUnit SI
public static final DensityUnit KG_PER_METER_3
public static final DensityUnit GRAM_PER_CENTIMETER_3
public DensityUnit(MassUnit massUnit, LengthUnit lengthUnit, String nameKey, String abbreviationKey, UnitSystem unitSystem)
massUnit - the unit of mass for the density unit, e.g., kglengthUnit - the unit of length for the density unit, e.g., meternameKey - 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 DensityUnit(String nameKey, String abbreviationKey, UnitSystem unitSystem, DensityUnit 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 getMassUnit()
public final LengthUnit getLengthUnit()
public final DensityUnit getStandardUnit()
getStandardUnit in class Unit<DensityUnit>public final String getSICoefficientsString()
getSICoefficientsString in class Unit<DensityUnit>Copyright © 2014–2015 Delft University of Technology. All rights reserved.