public class MoneyPerMassUnit extends LinearUnit<MoneyPerMassUnit>
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-03-02 19:06:46 +0100 (Sat, 02 Mar 2019) $, @version $Revision: 342 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static MoneyPerMassUnit |
EUR_PER_KILOGRAM
Euro per kg.
|
static MoneyPerMassUnit |
EUR_PER_METRIC_TON
Euro per metric ton.
|
static MoneyPerMassUnit |
USD_PER_LONG_TON
US$ per long ton.
|
static MoneyPerMassUnit |
USD_PER_POUND
US$ per pound.
|
static MoneyPerMassUnit |
USD_PER_SHORT_TON
US$ per short ton.
|
STANDARD_UNITS
Constructor and Description |
---|
MoneyPerMassUnit(MoneyUnit moneyUnit,
MassUnit massUnit,
String name,
String abbreviation)
Build a user-defined money per mass unit from a money unit and an mass unit.
|
MoneyPerMassUnit(String name,
String abbreviation,
MoneyPerMassUnit referenceUnit,
double scaleFactorToReferenceUnit)
Build a user-defined MoneyPerMassUnit with a conversion factor to another MoneyPerMassUnit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
MassUnit |
getMassUnit() |
MoneyUnit |
getMoneyUnit() |
String |
getSICoefficientsString() |
static MoneyPerMassUnit |
getStandardMoneyPerMassUnit() |
MoneyPerMassUnit |
getStandardUnit() |
int |
hashCode() |
protected static void |
setStandardUnit(MoneyUnit standardMoneyUnit)
Set the standard MoneyPerMassUnit in case the standard MoneyUnit changes, as the standard money unit is flexible.
|
equalsIgnoreNaming, getScale, getScaleFactor
generateHashCode, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getDefaultLocaleAbbreviation, getDefaultLocaleName, getDefaultLocaleTextualRepresentation, getDefaultLocaleTextualRepresentations, getDefaultTextualRepresentation, getName, getSICoefficients, getTextualRepresentations, getUnits, getUnitSystem, isBaseSIUnit, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public static final MoneyPerMassUnit EUR_PER_KILOGRAM
public static final MoneyPerMassUnit EUR_PER_METRIC_TON
public static final MoneyPerMassUnit USD_PER_POUND
public static final MoneyPerMassUnit USD_PER_LONG_TON
public static final MoneyPerMassUnit USD_PER_SHORT_TON
public MoneyPerMassUnit(MoneyUnit moneyUnit, MassUnit massUnit, String name, String abbreviation)
moneyUnit
- MoneyUnit; the unit of money for the money per mass unit, e.g., EURmassUnit
- MassUnit; the unit of mass for the money per mass unit, e.g., kgname
- 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 MoneyPerMassUnit(String name, String abbreviation, MoneyPerMassUnit referenceUnit, double scaleFactorToReferenceUnit)
name
- String; the long name of the unitabbreviation
- String; the abbreviation of the unitreferenceUnit
- MoneyPerMassUnit; 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 MassUnit getMassUnit()
protected static void setStandardUnit(MoneyUnit standardMoneyUnit)
standardMoneyUnit
- MoneyUnit; the new standard money unit.public final MoneyPerMassUnit getStandardUnit()
getStandardUnit
in class Unit<MoneyPerMassUnit>
public static MoneyPerMassUnit getStandardMoneyPerMassUnit()
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<MoneyPerMassUnit>
public int hashCode()
hashCode
in class LinearUnit<MoneyPerMassUnit>
public boolean equals(Object obj)
equals
in class LinearUnit<MoneyPerMassUnit>
Copyright © 2015–2019 Delft University of Technology. All rights reserved.