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-03-03 00:53:50 +0100 (Sun, 03 Mar 2019) $, @version $Revision: 349 $, 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
NUMBER_PATTERN
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.
|
static FloatPressure |
valueOf(String text)
Returns a FloatPressure representation of a textual representation of a value with a unit.
|
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, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocale
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 valueunit
- unit for the float valuepublic FloatPressure(FloatPressure value)
value
- Scalar from which to construct this instancepublic FloatPressure(double value, PressureUnit unit)
value
- double valueunit
- 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 value in SI unitspublic static FloatPressure interpolate(FloatPressure zero, FloatPressure one, float ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static FloatPressure max(FloatPressure r1, FloatPressure r2)
r1
- the first scalarr2
- the second scalarpublic static FloatPressure max(FloatPressure r1, FloatPressure r2, FloatPressure... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatPressure min(FloatPressure r1, FloatPressure r2)
r1
- the first scalarr2
- the second scalarpublic static FloatPressure min(FloatPressure r1, FloatPressure r2, FloatPressure... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatPressure valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a FloatPressureIllegalArgumentException
- when the text cannot be parsedpublic final FloatDimensionless divideBy(FloatPressure v)
v
- FloatPressure scalarpublic final FloatForce multiplyBy(FloatArea v)
v
- FloatPressure scalarpublic final FloatEnergy multiplyBy(FloatVolume v)
v
- FloatPressure scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.