public class FloatPressure extends AbstractFloatScalarRel<PressureUnit,FloatPressure>
FloatScalar.Rel<PressureUnit> value = new FloatScalar.Rel<PressureUnit>(100.0, PressureUnit.SI);we can now write:
FloatPressure value = new FloatPressure(100.0, PressureUnit.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 DJUNITS License.
$LastChangedDate: 2019-01-18 00:35:01 +0100 (Fri, 18 Jan 2019) $, @version $Revision: 324 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static FloatPressure |
NaN
constant with value NaN.
|
static FloatPressure |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static FloatPressure |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static FloatPressure |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static FloatPressure |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static FloatPressure |
ZERO
constant with value zero.
|
si
Constructor and Description |
---|
FloatPressure(double value,
PressureUnit unit)
Construct FloatPressure scalar using a double value.
|
FloatPressure(FloatPressure value)
Construct FloatPressure scalar.
|
FloatPressure(float value,
PressureUnit unit)
Construct FloatPressure scalar.
|
Modifier and Type | Method and Description |
---|---|
static FloatPressure |
createSI(float value)
Construct FloatPressure scalar.
|
FloatDimensionless |
divideBy(FloatPressure v)
Calculate the division of FloatPressure and FloatPressure, which results in a FloatDimensionless scalar.
|
FloatPressure |
instantiateRel(float value,
PressureUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatPressure |
interpolate(FloatPressure zero,
FloatPressure one,
float ratio)
Interpolate between two values.
|
static FloatPressure |
max(FloatPressure r1,
FloatPressure r2)
Return the maximum value of two relative scalars.
|
static FloatPressure |
max(FloatPressure r1,
FloatPressure r2,
FloatPressure... rn)
Return the maximum value of more than two relative scalars.
|
static FloatPressure |
min(FloatPressure r1,
FloatPressure r2)
Return the minimum value of two relative scalars.
|
static FloatPressure |
min(FloatPressure r1,
FloatPressure r2,
FloatPressure... rn)
Return the minimum value of more than two relative scalars.
|
FloatForce |
multiplyBy(FloatArea v)
Calculate the multiplication of FloatPressure and FloatArea, which results in a FloatForce scalar.
|
FloatEnergy |
multiplyBy(FloatVolume v)
Calculate the multiplication of FloatPressure and FloatVolume, which results in a FloatEnergy scalar.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, 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 FloatPressure ZERO
public static final FloatPressure NaN
public static final FloatPressure POSITIVE_INFINITY
public static final FloatPressure NEGATIVE_INFINITY
public static final FloatPressure POS_MAXVALUE
public static final FloatPressure NEG_MAXVALUE
public FloatPressure(float value, PressureUnit unit)
value
- float; float valueunit
- PressureUnit; unit for the float valuepublic FloatPressure(FloatPressure value)
value
- FloatPressure; Scalar from which to construct this instancepublic FloatPressure(double value, PressureUnit unit)
value
- double; double valueunit
- PressureUnit; unit for the resulting float valuepublic final FloatPressure instantiateRel(float value, PressureUnit unit)
instantiateRel
in class AbstractFloatScalarRel<PressureUnit,FloatPressure>
value
- float; the float valueunit
- U; the unitpublic static final FloatPressure createSI(float value)
value
- float; float value in SI unitspublic static FloatPressure interpolate(FloatPressure zero, FloatPressure one, float ratio)
zero
- FloatPressure; the low valueone
- FloatPressure; the high valueratio
- float; the ratio between 0 and 1, inclusivepublic static FloatPressure max(FloatPressure r1, FloatPressure r2)
r1
- FloatPressure; the first scalarr2
- FloatPressure; the second scalarpublic static FloatPressure max(FloatPressure r1, FloatPressure r2, FloatPressure... rn)
r1
- FloatPressure; the first scalarr2
- FloatPressure; the second scalarrn
- FloatPressure...; the other scalarspublic static FloatPressure min(FloatPressure r1, FloatPressure r2)
r1
- FloatPressure; the first scalarr2
- FloatPressure; the second scalarpublic static FloatPressure min(FloatPressure r1, FloatPressure r2, FloatPressure... rn)
r1
- FloatPressure; the first scalarr2
- FloatPressure; the second scalarrn
- FloatPressure...; the other scalarspublic final FloatDimensionless divideBy(FloatPressure v)
v
- FloatPressure; FloatPressure scalarpublic final FloatForce multiplyBy(FloatArea v)
v
- FloatArea; FloatPressure scalarpublic final FloatEnergy multiplyBy(FloatVolume v)
v
- FloatVolume; FloatPressure scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.