public class FloatVolume extends AbstractFloatScalarRel<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-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2019-01-18 00:35:01 +0100 (Fri, 18 Jan 2019) $, @version $Revision: 324 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static FloatVolume |
NaN
constant with value NaN.
|
static FloatVolume |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static FloatVolume |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static FloatVolume |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static FloatVolume |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
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 |
---|---|
static FloatVolume |
createSI(float value)
Construct FloatVolume scalar.
|
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.
|
FloatVolume |
instantiateRel(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, 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 FloatVolume ZERO
public static final FloatVolume NaN
public static final FloatVolume POSITIVE_INFINITY
public static final FloatVolume NEGATIVE_INFINITY
public static final FloatVolume POS_MAXVALUE
public static final FloatVolume NEG_MAXVALUE
public FloatVolume(float value, VolumeUnit unit)
value
- float; float valueunit
- VolumeUnit; unit for the float valuepublic FloatVolume(FloatVolume value)
value
- FloatVolume; Scalar from which to construct this instancepublic FloatVolume(double value, VolumeUnit unit)
value
- double; double valueunit
- VolumeUnit; unit for the resulting float valuepublic final FloatVolume instantiateRel(float value, VolumeUnit unit)
instantiateRel
in class AbstractFloatScalarRel<VolumeUnit,FloatVolume>
value
- float; the float valueunit
- U; the unitpublic static final FloatVolume createSI(float value)
value
- float; float value in SI unitspublic static FloatVolume interpolate(FloatVolume zero, FloatVolume one, float ratio)
zero
- FloatVolume; the low valueone
- FloatVolume; the high valueratio
- float; the ratio between 0 and 1, inclusivepublic static FloatVolume max(FloatVolume r1, FloatVolume r2)
r1
- FloatVolume; the first scalarr2
- FloatVolume; the second scalarpublic static FloatVolume max(FloatVolume r1, FloatVolume r2, FloatVolume... rn)
r1
- FloatVolume; the first scalarr2
- FloatVolume; the second scalarrn
- FloatVolume...; the other scalarspublic static FloatVolume min(FloatVolume r1, FloatVolume r2)
r1
- FloatVolume; the first scalarr2
- FloatVolume; the second scalarpublic static FloatVolume min(FloatVolume r1, FloatVolume r2, FloatVolume... rn)
r1
- FloatVolume; the first scalarr2
- FloatVolume; the second scalarrn
- FloatVolume...; the other scalarspublic final FloatDimensionless divideBy(FloatVolume v)
v
- FloatVolume; FloatVolume scalarpublic final FloatMass multiplyBy(FloatDensity v)
v
- FloatDensity; FloatVolume scalarpublic final FloatEnergy multiplyBy(FloatPressure v)
v
- FloatPressure; FloatVolume scalarpublic final FloatArea divideBy(FloatLength v)
v
- FloatLength; FloatVolume scalarpublic final FloatLength divideBy(FloatArea v)
v
- FloatArea; FloatVolume scalarpublic final FloatArea multiplyBy(FloatLinearDensity v)
v
- FloatLinearDensity; FloatVolume scalarpublic final FloatFlowVolume divideBy(FloatDuration v)
v
- FloatDuration; FloatVolume scalarpublic final FloatDuration divideBy(FloatFlowVolume v)
v
- FloatFlowVolume; FloatVolume scalarpublic final FloatMoney multiplyBy(FloatMoneyPerVolume v)
v
- FloatMoneyPerVolume; FloatVolume scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.