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