U - the unit typepublic abstract class OffsetUnit<U extends Unit<U>> extends Unit<U>
Copyright (c) 2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-10-04 20:48:33 +0200 (Sun, 04 Oct 2015) $, @version $Revision: 87 $, by $Author: averbraeck $, initial
version Jun 5, 2014
| Constructor and Description |
|---|
OffsetUnit(String nameOrNameKey,
String abbreviationOrAbbreviationKey,
UnitSystem unitSystem,
boolean standardUnit)
Build a standard unit.
|
OffsetUnit(String nameOrNameKey,
String abbreviationOrAbbreviationKey,
UnitSystem unitSystem,
U referenceUnit,
double conversionFactorToReferenceUnit,
double offsetToStandardUnit,
boolean standardUnit)
Build an offset unit with a conversion factor and offset to another unit.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getOffsetToStandardUnit() |
equals, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getConversionFactorToStandardUnit, getName, getNameKey, getSICoefficients, getSICoefficientsString, getStandardUnit, getUnits, getUnitSystem, hashCode, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toStringpublic OffsetUnit(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 unitpublic OffsetUnit(String nameOrNameKey, String abbreviationOrAbbreviationKey, UnitSystem unitSystem, U referenceUnit, double conversionFactorToReferenceUnit, double offsetToStandardUnit, 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 unitoffsetToStandardUnit - the offset to add to convert to the standard (e.g., SI) unitstandardUnit - indicates whether it is a standard unit with a definition in the locale, or a user-defined unitCopyright © 2015 Delft University of Technology. All rights reserved.