public class FloatFlowMass extends AbstractFloatScalarRel<FlowMassUnit,FloatFlowMass>
FloatScalar.Rel<FlowMassUnit> value = new FloatScalar.Rel<FlowMassUnit>(100.0, FlowMassUnit.SI);we can now write:
FloatFlowMass value = new FloatFlowMass(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-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2018-01-28 03:17:44 +0100 (Sun, 28 Jan 2018) $, @version $Revision: 256 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static FloatFlowMass |
NaN
constant with value NaN.
|
static FloatFlowMass |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static FloatFlowMass |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static FloatFlowMass |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static FloatFlowMass |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static FloatFlowMass |
ZERO
constant with value zero.
|
si
Constructor and Description |
---|
FloatFlowMass(double value,
FlowMassUnit unit)
Construct FloatFlowMass scalar using a double value.
|
FloatFlowMass(FloatFlowMass value)
Construct FloatFlowMass scalar.
|
FloatFlowMass(float value,
FlowMassUnit unit)
Construct FloatFlowMass scalar.
|
Modifier and Type | Method and Description |
---|---|
static FloatFlowMass |
createSI(float value)
Construct FloatFlowMass scalar.
|
FloatDimensionless |
divideBy(FloatFlowMass v)
Calculate the division of FloatFlowMass and FloatFlowMass, which results in a FloatDimensionless scalar.
|
FloatMass |
divideBy(FloatFrequency v)
Calculate the division of FloatFlowMass and FloatFrequency, which results in a FloatMass scalar.
|
FloatFrequency |
divideBy(FloatMass v)
Calculate the division of FloatFlowMass and FloatMass, which results in a FloatFrequency scalar.
|
FloatFlowMass |
instantiateRel(float value,
FlowMassUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatFlowMass |
interpolate(FloatFlowMass zero,
FloatFlowMass one,
float ratio)
Interpolate between two values.
|
static FloatFlowMass |
max(FloatFlowMass r1,
FloatFlowMass r2)
Return the maximum value of two relative scalars.
|
static FloatFlowMass |
max(FloatFlowMass r1,
FloatFlowMass r2,
FloatFlowMass... rn)
Return the maximum value of more than two relative scalars.
|
static FloatFlowMass |
min(FloatFlowMass r1,
FloatFlowMass r2)
Return the minimum value of two relative scalars.
|
static FloatFlowMass |
min(FloatFlowMass r1,
FloatFlowMass r2,
FloatFlowMass... rn)
Return the minimum value of more than two relative scalars.
|
FloatMass |
multiplyBy(FloatDuration v)
Calculate the multiplication of FloatFlowMass and FloatDuration, which results in a FloatMass scalar.
|
FloatForce |
multiplyBy(FloatSpeed v)
Calculate the multiplication of FloatFlowMass and FloatSpeed, which results in a FloatForce 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 FloatFlowMass ZERO
public static final FloatFlowMass NaN
public static final FloatFlowMass POSITIVE_INFINITY
public static final FloatFlowMass NEGATIVE_INFINITY
public static final FloatFlowMass POS_MAXVALUE
public static final FloatFlowMass NEG_MAXVALUE
public FloatFlowMass(float value, FlowMassUnit unit)
value
- float valueunit
- unit for the float valuepublic FloatFlowMass(FloatFlowMass value)
value
- Scalar from which to construct this instancepublic FloatFlowMass(double value, FlowMassUnit unit)
value
- double valueunit
- unit for the resulting float valuepublic final FloatFlowMass instantiateRel(float value, FlowMassUnit unit)
instantiateRel
in class AbstractFloatScalarRel<FlowMassUnit,FloatFlowMass>
value
- the float valueunit
- the unitpublic static final FloatFlowMass createSI(float value)
value
- float value in SI unitspublic static FloatFlowMass interpolate(FloatFlowMass zero, FloatFlowMass one, float ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static FloatFlowMass max(FloatFlowMass r1, FloatFlowMass r2)
r1
- the first scalarr2
- the second scalarpublic static FloatFlowMass max(FloatFlowMass r1, FloatFlowMass r2, FloatFlowMass... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatFlowMass min(FloatFlowMass r1, FloatFlowMass r2)
r1
- the first scalarr2
- the second scalarpublic static FloatFlowMass min(FloatFlowMass r1, FloatFlowMass r2, FloatFlowMass... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic final FloatDimensionless divideBy(FloatFlowMass v)
v
- FloatFlowMass scalarpublic final FloatMass multiplyBy(FloatDuration v)
v
- FloatFlowMass scalarpublic final FloatMass divideBy(FloatFrequency v)
v
- FloatFlowMass scalarpublic final FloatFrequency divideBy(FloatMass v)
v
- FloatFlowMass scalarpublic final FloatForce multiplyBy(FloatSpeed v)
v
- FloatFlowMass scalarCopyright © 2015–2018 Delft University of Technology. All rights reserved.