public class AbsoluteTemperature extends AbstractDoubleScalarAbs<AbsoluteTemperatureUnit,AbsoluteTemperature,TemperatureUnit,Temperature>
DoubleScalar.Abs<AbsoluteTemperatureUnit> value =
new DoubleScalar.Abs<AbsoluteTemperatureUnit>(100.0, AbsoluteTemperatureUnit.SI);
we can now write:
AbsoluteTemperature value = new AbsoluteTemperature(100.0, AbsoluteTemperatureUnit.BASE);The compiler will automatically recognize which units belong to which quantity, and whether the quantity type and the unit used are compatible.
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.
$LastChangedDate: 2015-12-22 04:32:39 +0100 (Tue, 22 Dec 2015) $, @version $Revision: 180 $, by $Author: averbraeck $,
initial version Sep 1, 2015
| Modifier and Type | Field and Description |
|---|---|
static AbsoluteTemperature |
ZERO
constant with value zero.
|
siNUMBER_PATTERN| Constructor and Description |
|---|
AbsoluteTemperature(AbsoluteTemperature value)
Construct AbsoluteTemperature scalar.
|
AbsoluteTemperature(double value,
AbsoluteTemperatureUnit unit)
Construct AbsoluteTemperature scalar.
|
| Modifier and Type | Method and Description |
|---|---|
static AbsoluteTemperature |
createSI(double value)
Construct %TypeAbsl% scalar.
|
AbsoluteTemperature |
instantiateAbs(double value,
AbsoluteTemperatureUnit unit)
Construct a new Absolute Immutable DoubleScalar of the right type.
|
Temperature |
instantiateRel(double value,
TemperatureUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static AbsoluteTemperature |
interpolate(AbsoluteTemperature zero,
AbsoluteTemperature one,
double ratio)
Interpolate between two values.
|
static AbsoluteTemperature |
max(AbsoluteTemperature a1,
AbsoluteTemperature a2)
Return the maximum value of two absolute scalars.
|
static AbsoluteTemperature |
max(AbsoluteTemperature a1,
AbsoluteTemperature a2,
AbsoluteTemperature... an)
Return the maximum value of more than two absolute scalars.
|
static AbsoluteTemperature |
min(AbsoluteTemperature a1,
AbsoluteTemperature a2)
Return the minimum value of two absolute scalars.
|
static AbsoluteTemperature |
min(AbsoluteTemperature a1,
AbsoluteTemperature a2,
AbsoluteTemperature... an)
Return the minimum value of more than two absolute scalars.
|
static AbsoluteTemperature |
valueOf(String text)
Returns a AbsoluteTemperature representation of a textual representation of a value with a unit.
|
ceil, divideBy, floor, minus, minus, multiplyBy, plus, rint, roundcompareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocalebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final AbsoluteTemperature ZERO
public AbsoluteTemperature(double value,
AbsoluteTemperatureUnit unit)
value - double valueunit - unit for the double valuepublic AbsoluteTemperature(AbsoluteTemperature value)
value - Scalar from which to construct this instancepublic final AbsoluteTemperature instantiateAbs(double value, AbsoluteTemperatureUnit unit)
instantiateAbs in class AbstractDoubleScalarAbs<AbsoluteTemperatureUnit,AbsoluteTemperature,TemperatureUnit,Temperature>value - double; the double valueunit - AU; the unitpublic final Temperature instantiateRel(double value, TemperatureUnit unit)
instantiateRel in class AbstractDoubleScalarAbs<AbsoluteTemperatureUnit,AbsoluteTemperature,TemperatureUnit,Temperature>value - double; the double valueunit - RU; the unitpublic static final AbsoluteTemperature createSI(double value)
value - double value in SI unitspublic static AbsoluteTemperature interpolate(AbsoluteTemperature zero, AbsoluteTemperature one, double ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static AbsoluteTemperature max(AbsoluteTemperature a1, AbsoluteTemperature a2)
a1 - the first scalara2 - the second scalarpublic static AbsoluteTemperature max(AbsoluteTemperature a1, AbsoluteTemperature a2, AbsoluteTemperature... an)
a1 - the first scalara2 - the second scalaran - the other scalarspublic static AbsoluteTemperature min(AbsoluteTemperature a1, AbsoluteTemperature a2)
a1 - the first scalara2 - the second scalarpublic static AbsoluteTemperature min(AbsoluteTemperature a1, AbsoluteTemperature a2, AbsoluteTemperature... an)
a1 - the first scalara2 - the second scalaran - the other scalarspublic static AbsoluteTemperature valueOf(String text) throws IllegalArgumentException
text - String; the textual representation to parse into a AbsoluteTemperatureIllegalArgumentException - when the text cannot be parsedCopyright © 2015–2019 Delft University of Technology. All rights reserved.