public class Pressure extends TypedDoubleScalarRel<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-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2016-05-28 14:25:52 +0200 (Sat, 28 May 2016) $, @version $Revision: 202 $, by $Author: averbraeck $,
initial version Sep 5, 2015
DoubleScalar.Abs<U extends Unit<U>>, DoubleScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
static Pressure |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
Pressure(double value,
PressureUnit unit)
Construct Pressure scalar.
|
Pressure(Pressure value)
Construct Pressure scalar.
|
| Modifier and Type | Method and Description |
|---|---|
Dimensionless |
divideBy(Pressure v)
Calculate the division of Pressure and Pressure, which results in a Dimensionless scalar.
|
protected Pressure |
instantiateTypeRel(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.
|
abs, ceil, divideBy, floor, minus, multiplyBy, plus, rint, roundcompareTo, eq, ge, getSI, gt, le, lt, minus, ne, plusdivide, divide, doubleValue, equals, floatValue, getInUnit, getInUnit, hashCode, interpolate, interpolate, intValue, longValue, minus, minus, minus, multiply, multiply, plus, plus, plus, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final Pressure ZERO
public Pressure(double value,
PressureUnit unit)
value - double valueunit - unit for the double valuepublic Pressure(Pressure value)
value - Scalar from which to construct this instanceprotected final Pressure instantiateTypeRel(double value, PressureUnit unit)
instantiateTypeRel in class TypedDoubleScalarRel<PressureUnit,Pressure>value - the double valueunit - the unitpublic 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 final Dimensionless divideBy(Pressure v)
v - Pressure scalarpublic final Force multiplyBy(Area v)
v - Pressure scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.