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-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 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
NUMBER_PATTERN
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.
|
static FloatVolume |
valueOf(String text)
Returns a FloatVolume representation of a textual representation of a value with a unit.
|
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, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocale
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 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 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 value in SI unitspublic 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 static FloatVolume valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a FloatVolumeIllegalArgumentException
- when the text cannot be parsedpublic 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–2019 Delft University of Technology. All rights reserved.