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