public class FloatMass extends TypedFloatScalarRel<MassUnit,FloatMass>
FloatScalar.Rel<MassUnit> value = new FloatScalar.Rel<MassUnit>(100.0, MassUnit.SI);we can now write:
FloatMass value = new FloatMass(100.0, MassUnit.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
FloatScalar.Abs<U extends Unit<U>>, FloatScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
static FloatMass |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
FloatMass(double value,
MassUnit unit)
Construct FloatMass scalar using a double value.
|
FloatMass(FloatMass value)
Construct FloatMass scalar.
|
FloatMass(float value,
MassUnit unit)
Construct FloatMass scalar.
|
| Modifier and Type | Method and Description |
|---|---|
FloatVolume |
divideBy(FloatDensity v)
Calculate the division of FloatMass and FloatDensity, which results in a FloatVolume scalar.
|
FloatFlowMass |
divideBy(FloatDuration v)
Calculate the division of FloatMass and FloatDuration, which results in a FloatFlowMass scalar.
|
FloatDuration |
divideBy(FloatFlowMass v)
Calculate the division of FloatMass and FloatFlowMass, which results in a FloatDuration scalar.
|
FloatDimensionless |
divideBy(FloatMass v)
Calculate the division of FloatMass and FloatMass, which results in a FloatDimensionless scalar.
|
FloatDensity |
divideBy(FloatVolume v)
Calculate the division of FloatMass and FloatVolume, which results in a FloatDensity scalar.
|
protected FloatMass |
instantiateTypeRel(float value,
MassUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatMass |
interpolate(FloatMass zero,
FloatMass one,
float ratio)
Interpolate between two values.
|
static FloatMass |
max(FloatMass r1,
FloatMass r2)
Return the maximum value of two relative scalars.
|
static FloatMass |
max(FloatMass r1,
FloatMass r2,
FloatMass... rn)
Return the maximum value of more than two relative scalars.
|
static FloatMass |
min(FloatMass r1,
FloatMass r2)
Return the minimum value of two relative scalars.
|
static FloatMass |
min(FloatMass r1,
FloatMass r2,
FloatMass... rn)
Return the minimum value of more than two relative scalars.
|
FloatForce |
multiplyBy(FloatAcceleration v)
Calculate the multiplication of FloatMass and FloatAcceleration, which results in a FloatForce scalar.
|
FloatFlowMass |
multiplyBy(FloatFrequency v)
Calculate the multiplication of FloatMass and FloatFrequency, which results in a FloatFlowMass scalar.
|
FloatMoney |
multiplyBy(FloatMoneyPerMass v)
Calculate the multiplication of FloatMass and FloatMoneyPerMass, which results in a FloatMoney 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 FloatMass ZERO
public FloatMass(float value,
MassUnit unit)
value - float valueunit - unit for the float valuepublic FloatMass(FloatMass value)
value - Scalar from which to construct this instancepublic FloatMass(double value,
MassUnit unit)
value - double valueunit - unit for the resulting float valueprotected final FloatMass instantiateTypeRel(float value, MassUnit unit)
instantiateTypeRel in class TypedFloatScalarRel<MassUnit,FloatMass>value - the float valueunit - the unitpublic static FloatMass interpolate(FloatMass zero, FloatMass one, float ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static FloatMass max(FloatMass r1, FloatMass r2)
r1 - the first scalarr2 - the second scalarpublic static FloatMass max(FloatMass r1, FloatMass r2, FloatMass... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static FloatMass min(FloatMass r1, FloatMass r2)
r1 - the first scalarr2 - the second scalarpublic static FloatMass min(FloatMass r1, FloatMass r2, FloatMass... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final FloatDimensionless divideBy(FloatMass v)
v - FloatMass scalarpublic final FloatDuration divideBy(FloatFlowMass v)
v - FloatMass scalarpublic final FloatFlowMass divideBy(FloatDuration v)
v - FloatMass scalarpublic final FloatForce multiplyBy(FloatAcceleration v)
v - FloatMass scalarpublic final FloatFlowMass multiplyBy(FloatFrequency v)
v - FloatMass scalarpublic final FloatVolume divideBy(FloatDensity v)
v - FloatMass scalarpublic final FloatDensity divideBy(FloatVolume v)
v - FloatMass scalarpublic final FloatMoney multiplyBy(FloatMoneyPerMass v)
v - FloatMass scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.