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