public class FloatAbsoluteTemperature extends AbstractFloatScalarAbs<AbsoluteTemperatureUnit,FloatAbsoluteTemperature,TemperatureUnit,FloatTemperature>
FloatScalar.Abs<AbsoluteTemperatureUnit> value = new FloatScalar.Abs<AbsoluteTemperatureUnit>(100.0, AbsoluteTemperatureUnit.SI);we can now write:
FloatAbsoluteTemperature value = new FloatAbsoluteTemperature(100.0, AbsoluteTemperatureUnit.SI);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: 2019-02-27 23:44:43 +0100 (Wed, 27 Feb 2019) $, @version $Revision: 333 $, by $Author: averbraeck $,
initial version Sep 1, 2015
Modifier and Type | Field and Description |
---|---|
static FloatAbsoluteTemperature |
ZERO
constant with value zero.
|
si
NUMBER_PATTERN
Constructor and Description |
---|
FloatAbsoluteTemperature(double value,
AbsoluteTemperatureUnit unit)
Construct FloatAbsoluteTemperature scalar using a double value.
|
FloatAbsoluteTemperature(FloatAbsoluteTemperature value)
Construct FloatAbsoluteTemperature scalar.
|
FloatAbsoluteTemperature(float value,
AbsoluteTemperatureUnit unit)
Construct FloatAbsoluteTemperature scalar.
|
Modifier and Type | Method and Description |
---|---|
static FloatAbsoluteTemperature |
createSI(float value)
Construct FloatAbsoluteTemperature scalar.
|
FloatAbsoluteTemperature |
instantiateAbs(float value,
AbsoluteTemperatureUnit unit)
Construct a new Absolute Immutable FloatScalar of the right type.
|
FloatTemperature |
instantiateRel(float value,
TemperatureUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatAbsoluteTemperature |
interpolate(FloatAbsoluteTemperature zero,
FloatAbsoluteTemperature one,
float ratio)
Interpolate between two values.
|
static FloatAbsoluteTemperature |
max(FloatAbsoluteTemperature a1,
FloatAbsoluteTemperature a2)
Return the maximum value of two absolute scalars.
|
static FloatAbsoluteTemperature |
max(FloatAbsoluteTemperature a1,
FloatAbsoluteTemperature a2,
FloatAbsoluteTemperature... an)
Return the maximum value of more than two absolute scalars.
|
static FloatAbsoluteTemperature |
min(FloatAbsoluteTemperature a1,
FloatAbsoluteTemperature a2)
Return the minimum value of two absolute scalars.
|
static FloatAbsoluteTemperature |
min(FloatAbsoluteTemperature a1,
FloatAbsoluteTemperature a2,
FloatAbsoluteTemperature... an)
Return the minimum value of more than two absolute scalars.
|
static FloatAbsoluteTemperature |
valueOf(String text)
Returns a FloatAbsoluteTemperature representation of a textual representation of a value with a unit.
|
ceil, divideBy, floor, minus, minus, multiplyBy, plus, rint, round
compareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toString
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocale
byteValue, shortValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
DIV, MULT, POW
public static final FloatAbsoluteTemperature ZERO
public FloatAbsoluteTemperature(float value, AbsoluteTemperatureUnit unit)
value
- float valueunit
- unit for the float valuepublic FloatAbsoluteTemperature(double value, AbsoluteTemperatureUnit unit)
value
- double valueunit
- unit for the resulting float valuepublic FloatAbsoluteTemperature(FloatAbsoluteTemperature value)
value
- Scalar from which to construct this instancepublic final FloatAbsoluteTemperature instantiateAbs(float value, AbsoluteTemperatureUnit unit)
instantiateAbs
in class AbstractFloatScalarAbs<AbsoluteTemperatureUnit,FloatAbsoluteTemperature,TemperatureUnit,FloatTemperature>
value
- float; the float valueunit
- AU; the unitpublic final FloatTemperature instantiateRel(float value, TemperatureUnit unit)
instantiateRel
in class AbstractFloatScalarAbs<AbsoluteTemperatureUnit,FloatAbsoluteTemperature,TemperatureUnit,FloatTemperature>
value
- float; the float valueunit
- RU; the unitpublic static final FloatAbsoluteTemperature createSI(float value)
value
- float value in BASE unitspublic static FloatAbsoluteTemperature interpolate(FloatAbsoluteTemperature zero, FloatAbsoluteTemperature one, float ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static FloatAbsoluteTemperature max(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2)
a1
- the first scalara2
- the second scalarpublic static FloatAbsoluteTemperature max(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2, FloatAbsoluteTemperature... an)
a1
- the first scalara2
- the second scalaran
- the other scalarspublic static FloatAbsoluteTemperature min(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2)
a1
- the first scalara2
- the second scalarpublic static FloatAbsoluteTemperature min(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2, FloatAbsoluteTemperature... an)
a1
- the first scalara2
- the second scalaran
- the other scalarspublic static FloatAbsoluteTemperature valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a FloatAbsoluteTemperatureIllegalArgumentException
- when the text cannot be parsedCopyright © 2015–2019 Delft University of Technology. All rights reserved.