U - the linear Unit.public abstract class LinearUnit<U extends LinearUnit<U>> extends Unit<U>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
scale, STANDARD_UNITS| Modifier | Constructor and Description |
|---|---|
|
LinearUnit(String nameOrNameKey,
String abbreviationOrAbbreviationKey,
UnitSystem unitSystem,
boolean standardUnit)
Build a standard linear unit and create the fields for a unit.
|
protected |
LinearUnit(String nameOrNameKey,
String abbreviationOrAbbreviationKey,
UnitSystem unitSystem,
Scale scale,
boolean standardUnit)
Build a unit with a specific conversion scale to/from the standard unit.
|
protected |
LinearUnit(String nameOrNameKey,
String abbreviationOrAbbreviationKey,
UnitSystem unitSystem,
U referenceUnit,
double conversionFactorToReferenceUnit,
boolean standardUnit)
Build a unit with a linear conversion factor to another unit.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getConversionFactorToStandardUnit() |
LinearScale |
getScale() |
equals, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getName, getNameKey, getSICoefficients, getSICoefficientsString, getStandardUnit, getUnits, getUnitSystem, hashCode, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toStringpublic LinearUnit(String nameOrNameKey, String abbreviationOrAbbreviationKey, UnitSystem unitSystem, boolean standardUnit)
nameOrNameKey - if standardUnit: the key to the locale file for the long name of the unit, otherwise the name itselfabbreviationOrAbbreviationKey - if standardUnit: the key to the locale file for the abbreviation of the unit,
otherwise the abbreviation itselfunitSystem - the unit system, e.g. SI or ImperialstandardUnit - indicates whether it is a standard unit with a definition in the locale, or a user-defined unitprotected LinearUnit(String nameOrNameKey, String abbreviationOrAbbreviationKey, UnitSystem unitSystem, U referenceUnit, double conversionFactorToReferenceUnit, boolean standardUnit)
nameOrNameKey - if standardUnit: the key to the locale file for the long name of the unit, otherwise the name itselfabbreviationOrAbbreviationKey - if standardUnit: the key to the locale file for the abbreviation of the unit,
otherwise the abbreviation itselfunitSystem - 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 unitstandardUnit - indicates whether it is a standard unit with a definition in the locale, or a user-defined unitprotected LinearUnit(String nameOrNameKey, String abbreviationOrAbbreviationKey, UnitSystem unitSystem, Scale scale, boolean standardUnit)
nameOrNameKey - if standardUnit: the key to the locale file for the long name of the unit, otherwise the name itselfabbreviationOrAbbreviationKey - if standardUnit: the key to the locale file for the abbreviation of the unit,
otherwise the abbreviation itselfunitSystem - the unit system, e.g. SI or Imperialscale - the conversion scale to use for this unitstandardUnit - indicates whether it is a standard unit with a definition in the locale, or a user-defined unitpublic final LinearScale getScale()
getScale in class Unit<U extends LinearUnit<U>>public final double getConversionFactorToStandardUnit()
Copyright © 2015–2016 Delft University of Technology. All rights reserved.