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: 2017-01-30 14:23:11 +0100 (Mon, 30 Jan 2017) $, @version $Revision: 234 $, by $Author: averbraeck $,
initial version Sep 1, 2015
Modifier and Type | Field and Description |
---|---|
static FloatAbsoluteTemperature |
ZERO
constant with value zero.
|
si
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.
|
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
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; float valueunit
- AbsoluteTemperatureUnit; unit for the float valuepublic FloatAbsoluteTemperature(double value, AbsoluteTemperatureUnit unit)
value
- double; double valueunit
- AbsoluteTemperatureUnit; unit for the resulting float valuepublic FloatAbsoluteTemperature(FloatAbsoluteTemperature value)
value
- FloatAbsoluteTemperature; 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; float value in BASE unitspublic static FloatAbsoluteTemperature interpolate(FloatAbsoluteTemperature zero, FloatAbsoluteTemperature one, float ratio)
zero
- FloatAbsoluteTemperature; the low valueone
- FloatAbsoluteTemperature; the high valueratio
- float; the ratio between 0 and 1, inclusivepublic static FloatAbsoluteTemperature max(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2)
a1
- FloatAbsoluteTemperature; the first scalara2
- FloatAbsoluteTemperature; the second scalarpublic static FloatAbsoluteTemperature max(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2, FloatAbsoluteTemperature... an)
a1
- FloatAbsoluteTemperature; the first scalara2
- FloatAbsoluteTemperature; the second scalaran
- FloatAbsoluteTemperature...; the other scalarspublic static FloatAbsoluteTemperature min(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2)
a1
- FloatAbsoluteTemperature; the first scalara2
- FloatAbsoluteTemperature; the second scalarpublic static FloatAbsoluteTemperature min(FloatAbsoluteTemperature a1, FloatAbsoluteTemperature a2, FloatAbsoluteTemperature... an)
a1
- FloatAbsoluteTemperature; the first scalara2
- FloatAbsoluteTemperature; the second scalaran
- FloatAbsoluteTemperature...; the other scalarsCopyright © 2015–2019 Delft University of Technology. All rights reserved.