public class Pressure extends AbstractDoubleScalarRel<PressureUnit,Pressure>
DoubleScalar.Rel<PressureUnit> value = new DoubleScalar.Rel<PressureUnit>(100.0, PressureUnit.SI);we can now write:
Pressure value = new Pressure(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 Pressure |
NaN
constant with value NaN.
|
static Pressure |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static Pressure |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static Pressure |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static Pressure |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static Pressure |
ZERO
constant with value zero.
|
siNUMBER_PATTERN| Constructor and Description |
|---|
Pressure(double value,
PressureUnit unit)
Construct Pressure scalar.
|
Pressure(Pressure value)
Construct Pressure scalar.
|
| Modifier and Type | Method and Description |
|---|---|
static Pressure |
createSI(double value)
Construct Pressure scalar.
|
Dimensionless |
divideBy(Pressure v)
Calculate the division of Pressure and Pressure, which results in a Dimensionless scalar.
|
Pressure |
instantiateRel(double value,
PressureUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static Pressure |
interpolate(Pressure zero,
Pressure one,
double ratio)
Interpolate between two values.
|
static Pressure |
max(Pressure r1,
Pressure r2)
Return the maximum value of two relative scalars.
|
static Pressure |
max(Pressure r1,
Pressure r2,
Pressure... rn)
Return the maximum value of more than two relative scalars.
|
static Pressure |
min(Pressure r1,
Pressure r2)
Return the minimum value of two relative scalars.
|
static Pressure |
min(Pressure r1,
Pressure r2,
Pressure... rn)
Return the minimum value of more than two relative scalars.
|
Force |
multiplyBy(Area v)
Calculate the multiplication of Pressure and Area, which results in a Force scalar.
|
Energy |
multiplyBy(Volume v)
Calculate the multiplication of Pressure and Volume, which results in a Energy scalar.
|
static Pressure |
valueOf(String text)
Returns a Pressure representation of a textual representation of a value with a unit.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, 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 Pressure ZERO
public static final Pressure NaN
public static final Pressure POSITIVE_INFINITY
public static final Pressure NEGATIVE_INFINITY
public static final Pressure POS_MAXVALUE
public static final Pressure NEG_MAXVALUE
public Pressure(double value,
PressureUnit unit)
value - double valueunit - unit for the double valuepublic Pressure(Pressure value)
value - Scalar from which to construct this instancepublic final Pressure instantiateRel(double value, PressureUnit unit)
instantiateRel in class AbstractDoubleScalarRel<PressureUnit,Pressure>value - double; the double valueunit - U; the unitpublic static final Pressure createSI(double value)
value - double value in SI unitspublic static Pressure interpolate(Pressure zero, Pressure one, double ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static Pressure max(Pressure r1, Pressure r2)
r1 - the first scalarr2 - the second scalarpublic static Pressure max(Pressure r1, Pressure r2, Pressure... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static Pressure min(Pressure r1, Pressure r2)
r1 - the first scalarr2 - the second scalarpublic static Pressure min(Pressure r1, Pressure r2, Pressure... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static Pressure valueOf(String text) throws IllegalArgumentException
text - String; the textual representation to parse into a PressureIllegalArgumentException - when the text cannot be parsedpublic final Dimensionless divideBy(Pressure v)
v - Pressure scalarpublic final Force multiplyBy(Area v)
v - Pressure scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.