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