public class MoneyPerVolumeUnit extends LinearUnit<MoneyPerVolumeUnit>
Copyright (c) 2015-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2019-01-18 00:35:01 +0100 (Fri, 18 Jan 2019) $, @version $Revision: 324 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static MoneyPerVolumeUnit |
EUR_PER_CUBIC_METER
Euro per cubic meter.
|
static MoneyPerVolumeUnit |
EUR_PER_LITER
Euro per liter.
|
static MoneyPerVolumeUnit |
USD_PER_GALLON_US_FLUID
US$ per gallon (US).
|
static MoneyPerVolumeUnit |
USD_PER_OUNCE_US_FLUID
US$ per ounce (US).
|
STANDARD_UNITS
Constructor and Description |
---|
MoneyPerVolumeUnit(MoneyUnit moneyUnit,
VolumeUnit volumeUnit,
String name,
String abbreviation)
Build a user-defined money per volume unit from a money unit and an volume unit.
|
MoneyPerVolumeUnit(String name,
String abbreviation,
MoneyPerVolumeUnit referenceUnit,
double scaleFactorToReferenceUnit)
Build a user-defined MoneyPerVolumeUnit with a conversion factor to another MoneyPerVolumeUnit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
MoneyUnit |
getMoneyUnit() |
String |
getSICoefficientsString() |
static MoneyPerVolumeUnit |
getStandardMoneyPerVolumeUnit() |
MoneyPerVolumeUnit |
getStandardUnit() |
VolumeUnit |
getVolumeUnit() |
int |
hashCode() |
protected static void |
setStandardUnit(MoneyUnit standardMoneyUnit)
Set the standard MoneyPerVolumeUnit in case the standard MoneyUnit changes, as the standard money unit is flexible.
|
equalsIgnoreNaming, getScale, getScaleFactor
generateHashCode, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, isBaseSIUnit, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public static final MoneyPerVolumeUnit EUR_PER_CUBIC_METER
public static final MoneyPerVolumeUnit EUR_PER_LITER
public static final MoneyPerVolumeUnit USD_PER_GALLON_US_FLUID
public static final MoneyPerVolumeUnit USD_PER_OUNCE_US_FLUID
public MoneyPerVolumeUnit(MoneyUnit moneyUnit, VolumeUnit volumeUnit, String name, String abbreviation)
moneyUnit
- MoneyUnit; the unit of money for the money per volume unit, e.g., EURvolumeUnit
- VolumeUnit; the unit of volume for the money per volume unit, e.g., m^3name
- String; the key to the locale file for the long name of the unitabbreviation
- String; the key to the locale file for the abbreviation of the unitpublic MoneyPerVolumeUnit(String name, String abbreviation, MoneyPerVolumeUnit referenceUnit, double scaleFactorToReferenceUnit)
name
- String; the long name of the unitabbreviation
- String; the abbreviation of the unitreferenceUnit
- MoneyPerVolumeUnit; the unit to convert toscaleFactorToReferenceUnit
- double; multiply a value in this unit by the factor to convert to the given reference
unitpublic final MoneyUnit getMoneyUnit()
public final VolumeUnit getVolumeUnit()
protected static void setStandardUnit(MoneyUnit standardMoneyUnit)
standardMoneyUnit
- MoneyUnit; the new standard money unit.public final MoneyPerVolumeUnit getStandardUnit()
getStandardUnit
in class Unit<MoneyPerVolumeUnit>
public static MoneyPerVolumeUnit getStandardMoneyPerVolumeUnit()
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<MoneyPerVolumeUnit>
public int hashCode()
hashCode
in class LinearUnit<MoneyPerVolumeUnit>
public boolean equals(Object obj)
equals
in class LinearUnit<MoneyPerVolumeUnit>
Copyright © 2015–2019 Delft University of Technology. All rights reserved.