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