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