U
- the linear Unit.public abstract class LinearUnit<U extends LinearUnit<U>> extends Unit<U>
Copyright (c) 2013-2017 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 scaleFactorToReferenceUnit,
boolean standardUnit)
Build a unit with a linear conversion factor to another unit.
|
Modifier and Type | Method and Description |
---|---|
LinearScale |
getScale() |
double |
getScaleFactor() |
equals, generateHashCode, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getName, getNameKey, getSICoefficients, getSICoefficientsString, getStandardUnit, getUnits, getUnitSystem, hashCode, isBaseSIUnit, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public 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 scaleFactorToReferenceUnit, 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 toscaleFactorToReferenceUnit
- 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 LinearScale getScale()
getScale
in class Unit<U extends LinearUnit<U>>
public final double getScaleFactor()
Copyright © 2015–2017 Delft University of Technology. All rights reserved.