public class VolumeUnit extends Unit<VolumeUnit>
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 VolumeUnit |
CUBIC_CENTIMETER
cm^3.
|
static VolumeUnit |
CUBIC_DECIMETER
dm^3.
|
static VolumeUnit |
CUBIC_FOOT
ft^3.
|
static VolumeUnit |
CUBIC_INCH
in^3.
|
static VolumeUnit |
CUBIC_KM
km^3.
|
static VolumeUnit |
CUBIC_METER
m^3.
|
static VolumeUnit |
CUBIC_MILE
mile^3.
|
static VolumeUnit |
CUBIC_YARD
yd^3.
|
static VolumeUnit |
GALLON_IMP
gallon (imperial).
|
static VolumeUnit |
GALLON_US_FLUID
gallon (US), fluids.
|
static VolumeUnit |
LITER
liter.
|
static VolumeUnit |
OUNCE_IMP_FLUID
ounce (fluid imperial).
|
static VolumeUnit |
OUNCE_US_FLUID
ounce (fluid US).
|
static VolumeUnit |
PINT_IMP
pint (imperial).
|
static VolumeUnit |
PINT_US_FLUID
pint (fluid US).
|
static VolumeUnit |
QUART_IMP
quart (imperial).
|
static VolumeUnit |
QUART_US_FLUID
quart (fluid US).
|
static VolumeUnit |
SI
The SI unit for volume is m^3.
|
Constructor and Description |
---|
VolumeUnit(LengthUnit lengthUnit,
String nameKey,
String abbreviationKey,
UnitSystem unitSystem)
Define volume unit based on length, e.g.
|
VolumeUnit(String nameKey,
String abbreviationKey,
UnitSystem unitSystem,
VolumeUnit referenceUnit,
double conversionFactorToReferenceUnit)
This constructor constructs a unit out of another defined unit, e.g.
|
Modifier and Type | Method and Description |
---|---|
LengthUnit |
getLengthUnit() |
String |
getSICoefficientsString() |
VolumeUnit |
getStandardUnit() |
getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public static final VolumeUnit SI
public static final VolumeUnit CUBIC_METER
public static final VolumeUnit CUBIC_DECIMETER
public static final VolumeUnit LITER
public static final VolumeUnit CUBIC_CENTIMETER
public static final VolumeUnit CUBIC_KM
public static final VolumeUnit CUBIC_MILE
public static final VolumeUnit CUBIC_FOOT
public static final VolumeUnit CUBIC_INCH
public static final VolumeUnit CUBIC_YARD
public static final VolumeUnit GALLON_US_FLUID
public static final VolumeUnit GALLON_IMP
public static final VolumeUnit OUNCE_US_FLUID
public static final VolumeUnit OUNCE_IMP_FLUID
public static final VolumeUnit PINT_US_FLUID
public static final VolumeUnit PINT_IMP
public static final VolumeUnit QUART_US_FLUID
public static final VolumeUnit QUART_IMP
public VolumeUnit(LengthUnit lengthUnit, String nameKey, String abbreviationKey, UnitSystem unitSystem)
lengthUnit
- the unit of length for the speed 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 VolumeUnit(String nameKey, String abbreviationKey, UnitSystem unitSystem, VolumeUnit 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 VolumeUnit getStandardUnit()
getStandardUnit
in class Unit<VolumeUnit>
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<VolumeUnit>
Copyright © 2014–2015 Delft University of Technology. All rights reserved.