public class Volume extends AbstractDoubleScalarRel<VolumeUnit,Volume>
DoubleScalar.Rel<VolumeUnit> value = new DoubleScalar.Rel<VolumeUnit>(100.0, VolumeUnit.SI);we can now write:
Volume value = new Volume(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-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 Volume |
NaN
constant with value NaN.
|
static Volume |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static Volume |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static Volume |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static Volume |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static Volume |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
Volume(double value,
VolumeUnit unit)
Construct Volume scalar.
|
Volume(Volume value)
Construct Volume scalar.
|
| Modifier and Type | Method and Description |
|---|---|
static Volume |
createSI(double value)
Construct Volume scalar.
|
Length |
divideBy(Area v)
Calculate the division of Volume and Area, which results in a Length scalar.
|
FlowVolume |
divideBy(Duration v)
Calculate the division of Volume and Duration, which results in a FlowVolume scalar.
|
Duration |
divideBy(FlowVolume v)
Calculate the division of Volume and FlowVolume, which results in a Duration scalar.
|
Area |
divideBy(Length v)
Calculate the division of Volume and Length, which results in a Area scalar.
|
Dimensionless |
divideBy(Volume v)
Calculate the division of Volume and Volume, which results in a Dimensionless scalar.
|
Volume |
instantiateRel(double value,
VolumeUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static Volume |
interpolate(Volume zero,
Volume one,
double ratio)
Interpolate between two values.
|
static Volume |
max(Volume r1,
Volume r2)
Return the maximum value of two relative scalars.
|
static Volume |
max(Volume r1,
Volume r2,
Volume... rn)
Return the maximum value of more than two relative scalars.
|
static Volume |
min(Volume r1,
Volume r2)
Return the minimum value of two relative scalars.
|
static Volume |
min(Volume r1,
Volume r2,
Volume... rn)
Return the minimum value of more than two relative scalars.
|
Mass |
multiplyBy(Density v)
Calculate the multiplication of Volume and Density, which results in a Mass scalar.
|
Area |
multiplyBy(LinearDensity v)
Calculate the multiplication of Volume and LinearDensity, which results in a Area scalar.
|
Money |
multiplyBy(MoneyPerVolume v)
Calculate the multiplication of Volume and MoneyPerVolume, which results in a Money scalar.
|
Energy |
multiplyBy(Pressure v)
Calculate the multiplication of Volume and Pressure, which results in a Energy scalar.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, plus, rint, roundcompareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitbyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final Volume ZERO
public static final Volume NaN
public static final Volume POSITIVE_INFINITY
public static final Volume NEGATIVE_INFINITY
public static final Volume POS_MAXVALUE
public static final Volume NEG_MAXVALUE
public Volume(double value,
VolumeUnit unit)
value - double valueunit - unit for the double valuepublic Volume(Volume value)
value - Scalar from which to construct this instancepublic final Volume instantiateRel(double value, VolumeUnit unit)
instantiateRel in class AbstractDoubleScalarRel<VolumeUnit,Volume>value - the double valueunit - the unitpublic static final Volume createSI(double value)
value - double value in SI unitspublic static Volume interpolate(Volume zero, Volume one, double ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static Volume max(Volume r1, Volume r2)
r1 - the first scalarr2 - the second scalarpublic static Volume max(Volume r1, Volume r2, Volume... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static Volume min(Volume r1, Volume r2)
r1 - the first scalarr2 - the second scalarpublic static Volume min(Volume r1, Volume r2, Volume... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final Dimensionless divideBy(Volume v)
v - Volume scalarpublic final Mass multiplyBy(Density v)
v - Volume scalarpublic final Energy multiplyBy(Pressure v)
v - Volume scalarpublic final Area divideBy(Length v)
v - Volume scalarpublic final Length divideBy(Area v)
v - Volume scalarpublic final Area multiplyBy(LinearDensity v)
v - Volume scalarpublic final FlowVolume divideBy(Duration v)
v - Volume scalarpublic final Duration divideBy(FlowVolume v)
v - Volume scalarpublic final Money multiplyBy(MoneyPerVolume v)
v - Volume scalarCopyright © 2015–2018 Delft University of Technology. All rights reserved.