public class MoneyPerLengthUnit extends LinearUnit<MoneyPerLengthUnit>
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 MoneyPerLengthUnit |
EUR_PER_KILOMETER
Euro per kilometer.
|
static MoneyPerLengthUnit |
EUR_PER_METER
Euro per meter.
|
static MoneyPerLengthUnit |
USD_PER_FOOT
US$ per foot.
|
static MoneyPerLengthUnit |
USD_PER_MILE
US$ per mile.
|
STANDARD_UNITS
Constructor and Description |
---|
MoneyPerLengthUnit(MoneyUnit moneyUnit,
LengthUnit lengthUnit,
String name,
String abbreviation)
Build a user-defined money per length unit from a money unit and an length unit.
|
MoneyPerLengthUnit(String name,
String abbreviation,
MoneyPerLengthUnit referenceUnit,
double scaleFactorToReferenceUnit)
Build a user-defined MoneyPerLengthUnit with a conversion factor to another MoneyPerLengthUnit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
LengthUnit |
getLengthUnit() |
MoneyUnit |
getMoneyUnit() |
String |
getSICoefficientsString() |
static MoneyPerLengthUnit |
getStandardMoneyPerLengthUnit() |
MoneyPerLengthUnit |
getStandardUnit() |
int |
hashCode() |
protected static void |
setStandardUnit(MoneyUnit standardMoneyUnit)
Set the standard MoneyPerLengthUnit 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 MoneyPerLengthUnit EUR_PER_METER
public static final MoneyPerLengthUnit EUR_PER_KILOMETER
public static final MoneyPerLengthUnit USD_PER_MILE
public static final MoneyPerLengthUnit USD_PER_FOOT
public MoneyPerLengthUnit(MoneyUnit moneyUnit, LengthUnit lengthUnit, String name, String abbreviation)
moneyUnit
- MoneyUnit; the unit of money for the money per length unit, e.g., EURlengthUnit
- LengthUnit; the unit of length for the money per length unit, e.g., metername
- 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 MoneyPerLengthUnit(String name, String abbreviation, MoneyPerLengthUnit referenceUnit, double scaleFactorToReferenceUnit)
name
- String; the long name of the unitabbreviation
- String; the abbreviation of the unitreferenceUnit
- MoneyPerLengthUnit; 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 LengthUnit getLengthUnit()
protected static void setStandardUnit(MoneyUnit standardMoneyUnit)
standardMoneyUnit
- MoneyUnit; the new standard money unit.public final MoneyPerLengthUnit getStandardUnit()
getStandardUnit
in class Unit<MoneyPerLengthUnit>
public static MoneyPerLengthUnit getStandardMoneyPerLengthUnit()
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<MoneyPerLengthUnit>
public int hashCode()
hashCode
in class LinearUnit<MoneyPerLengthUnit>
public boolean equals(Object obj)
equals
in class LinearUnit<MoneyPerLengthUnit>
Copyright © 2015–2019 Delft University of Technology. All rights reserved.