U
- the linear Unit.public abstract class LinearUnit<U extends LinearUnit<U>> extends Unit<U>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
STANDARD_UNITS
Modifier | Constructor and Description |
---|---|
|
LinearUnit(String name,
String abbreviation,
UnitSystem unitSystem)
Build a user-defined unit with a linear scale and create the fields for that unit.
|
protected |
LinearUnit(String name,
String abbreviation,
UnitSystem unitSystem,
Scale scale)
Build a user-defined unit with a specific conversion scale to/from the standard unit.
|
protected |
LinearUnit(String name,
String abbreviation,
UnitSystem unitSystem,
U referenceUnit,
double scaleFactorToReferenceUnit)
Build a user-defined unit with a linear conversion factor to another unit.
|
|
LinearUnit(String abbreviationKey,
UnitSystem unitSystem)
Build a standard unit with a linear scale and create the fields for that unit.
|
protected |
LinearUnit(String abbreviationKey,
UnitSystem unitSystem,
Scale scale)
Build a standard unit with a specific conversion scale to/from the standard unit.
|
protected |
LinearUnit(String abbreviationKey,
UnitSystem unitSystem,
U referenceUnit,
double scaleFactorToReferenceUnit)
Build a standard unit with a linear conversion factor to another unit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
equalsIgnoreNaming(Object obj)
Test if two units are the same, except for the name and abbreviation.
|
LinearScale |
getScale() |
double |
getScaleFactor() |
int |
hashCode() |
generateHashCode, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getDefaultLocaleAbbreviation, getDefaultLocaleName, getDefaultLocaleTextualRepresentation, getDefaultLocaleTextualRepresentations, getDefaultTextualRepresentation, getName, getSICoefficients, getSICoefficientsString, getStandardUnit, getTextualRepresentations, getUnits, getUnitSystem, isBaseSIUnit, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
public LinearUnit(String abbreviationKey, UnitSystem unitSystem)
abbreviationKey
- String; the key to the locale file for the abbreviation of the unitunitSystem
- UnitSystem; the unit system, e.g. SI or Imperialprotected LinearUnit(String abbreviationKey, UnitSystem unitSystem, U referenceUnit, double scaleFactorToReferenceUnit)
abbreviationKey
- String; the key to the locale file for the abbreviation of the unitunitSystem
- UnitSystem; the unit system, e.g. SI or ImperialreferenceUnit
- U; the unit to convert toscaleFactorToReferenceUnit
- double; multiply a value in this unit by the factor to convert to the given reference
unitprotected LinearUnit(String abbreviationKey, UnitSystem unitSystem, Scale scale)
abbreviationKey
- String; the key to the locale file for the abbreviation of the unitunitSystem
- UnitSystem; the unit system, e.g. SI or Imperialscale
- Scale; the conversion scale to use for this unitpublic LinearUnit(String name, String abbreviation, UnitSystem unitSystem)
name
- String; the name of the unitabbreviation
- String; the abbreviation of the unitunitSystem
- UnitSystem; the unit system, e.g. SI or Imperialprotected LinearUnit(String name, String abbreviation, UnitSystem unitSystem, U referenceUnit, double scaleFactorToReferenceUnit)
name
- String; the name of the unitabbreviation
- String; the abbreviation of the unitunitSystem
- UnitSystem; the unit system, e.g. SI or ImperialreferenceUnit
- U; the unit to convert toscaleFactorToReferenceUnit
- double; multiply a value in this unit by the factor to convert to the given reference
unitprotected LinearUnit(String name, String abbreviation, UnitSystem unitSystem, Scale scale)
name
- String; the name of the unitabbreviation
- String; the abbreviation of the unitunitSystem
- UnitSystem; the unit system, e.g. SI or Imperialscale
- Scale; the conversion scale to use for this unitpublic LinearScale getScale()
getScale
in class Unit<U extends LinearUnit<U>>
public final double getScaleFactor()
public int hashCode()
hashCode
in class Unit<U extends LinearUnit<U>>
public boolean equalsIgnoreNaming(Object obj)
equalsIgnoreNaming
in class Unit<U extends LinearUnit<U>>
obj
- Object; the object to compare withCopyright © 2015–2019 Delft University of Technology. All rights reserved.