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