public class FloatMoneyPerEnergy extends TypedFloatScalarRel<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-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2016-05-28 14:25:52 +0200 (Sat, 28 May 2016) $, @version $Revision: 202 $, by $Author: averbraeck $,
initial version Sep 5, 2015
FloatScalar.Abs<U extends Unit<U>>, FloatScalar.Rel<U extends Unit<U>>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.
|
protected FloatMoneyPerEnergy |
instantiateTypeRel(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, plus, rint, roundcompareTo, eq, ge, getSI, gt, le, lt, minus, ne, plusdivide, divide, doubleValue, equals, floatValue, getInUnit, getInUnit, hashCode, interpolate, interpolate, intValue, longValue, minus, minus, minus, multiply, multiply, plus, plus, plus, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic FloatMoneyPerEnergy(float value,
MoneyPerEnergyUnit unit)
value - float valueunit - unit for the float valuepublic FloatMoneyPerEnergy(FloatMoneyPerEnergy value)
value - Scalar from which to construct this instancepublic FloatMoneyPerEnergy(double value,
MoneyPerEnergyUnit unit)
value - double valueunit - unit for the resulting float valueprotected final FloatMoneyPerEnergy instantiateTypeRel(float value, MoneyPerEnergyUnit unit)
instantiateTypeRel in class TypedFloatScalarRel<MoneyPerEnergyUnit,FloatMoneyPerEnergy>value - the float valueunit - the unitpublic static FloatMoneyPerEnergy interpolate(FloatMoneyPerEnergy zero, FloatMoneyPerEnergy one, float ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static FloatMoneyPerEnergy max(FloatMoneyPerEnergy r1, FloatMoneyPerEnergy r2)
r1 - the first scalarr2 - the second scalarpublic static FloatMoneyPerEnergy max(FloatMoneyPerEnergy r1, FloatMoneyPerEnergy r2, FloatMoneyPerEnergy... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static FloatMoneyPerEnergy min(FloatMoneyPerEnergy r1, FloatMoneyPerEnergy r2)
r1 - the first scalarr2 - the second scalarpublic static FloatMoneyPerEnergy min(FloatMoneyPerEnergy r1, FloatMoneyPerEnergy r2, FloatMoneyPerEnergy... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final FloatDimensionless divideBy(FloatMoneyPerEnergy v)
v - FloatMoneyPerEnergy scalarpublic final FloatMoney multiplyBy(FloatEnergy v)
v - FloatMoneyPerEnergy scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.