public class DensityUnit extends Unit<DensityUnit>
Copyright (c) 2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-10-04 20:48:33 +0200 (Sun, 04 Oct 2015) $, @version $Revision: 87 $, by $Author: averbraeck $, initial
version May 15, 2014
| 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 name,
String abbreviation,
UnitSystem unitSystem)
Define user defined density unit based on mass and length.
|
DensityUnit(String name,
String abbreviation,
UnitSystem unitSystem,
DensityUnit referenceUnit,
double conversionFactorToReferenceUnit)
Build a user-defined unit with a conversion factor to another unit.
|
| Modifier and Type | Method and Description |
|---|---|
LengthUnit |
getLengthUnit() |
MassUnit |
getMassUnit() |
String |
getSICoefficientsString() |
DensityUnit |
getStandardUnit() |
equals, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, hashCode, isLocalizable, 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 name, String abbreviation, UnitSystem unitSystem)
massUnit - the unit of mass for the density unit, e.g., kglengthUnit - the unit of length for the density unit, e.g., metername - the long name of the unitabbreviation - the abbreviation of the unitunitSystem - the unit system, e.g. SI or Imperialpublic DensityUnit(String name, String abbreviation, UnitSystem unitSystem, DensityUnit referenceUnit, double conversionFactorToReferenceUnit)
name - the long name of the unitabbreviation - 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 © 2015 Delft University of Technology. All rights reserved.