public class Area extends AbstractDoubleScalarRel<AreaUnit,Area>
DoubleScalar.Rel<AreaUnit> value = new DoubleScalar.Rel<AreaUnit>(100.0, AreaUnit.SI);we can now write:
Area value = new Area(100.0, AreaUnit.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-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2018-01-28 03:17:44 +0100 (Sun, 28 Jan 2018) $, @version $Revision: 256 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static Area |
NaN
constant with value NaN.
|
static Area |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static Area |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static Area |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static Area |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static Area |
ZERO
constant with value zero.
|
si
Constructor and Description |
---|
Area(Area value)
Construct Area scalar.
|
Area(double value,
AreaUnit unit)
Construct Area scalar.
|
Modifier and Type | Method and Description |
---|---|
static Area |
createSI(double value)
Construct Area scalar.
|
Dimensionless |
divideBy(Area v)
Calculate the division of Area and Area, which results in a Dimensionless scalar.
|
Length |
divideBy(Length v)
Calculate the division of Area and Length, which results in a Length scalar.
|
Volume |
divideBy(LinearDensity v)
Calculate the division of Area and LinearDensity, which results in a Volume scalar.
|
LinearDensity |
divideBy(Volume v)
Calculate the division of Area and Volume, which results in a LinearDensity scalar.
|
Area |
instantiateRel(double value,
AreaUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static Area |
interpolate(Area zero,
Area one,
double ratio)
Interpolate between two values.
|
static Area |
max(Area r1,
Area r2)
Return the maximum value of two relative scalars.
|
static Area |
max(Area r1,
Area r2,
Area... rn)
Return the maximum value of more than two relative scalars.
|
static Area |
min(Area r1,
Area r2)
Return the minimum value of two relative scalars.
|
static Area |
min(Area r1,
Area r2,
Area... rn)
Return the minimum value of more than two relative scalars.
|
Volume |
multiplyBy(Length v)
Calculate the multiplication of Area and Length, which results in a Volume scalar.
|
Length |
multiplyBy(LinearDensity v)
Calculate the multiplication of Area and LinearDensity, which results in a Length scalar.
|
Money |
multiplyBy(MoneyPerArea v)
Calculate the multiplication of Area and MoneyPerArea, which results in a Money scalar.
|
Force |
multiplyBy(Pressure v)
Calculate the multiplication of Area and Pressure, which results in a Force scalar.
|
FlowVolume |
multiplyBy(Speed v)
Calculate the multiplication of Area and Speed, which results in a FlowVolume 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 static final Area ZERO
public static final Area NaN
public static final Area POSITIVE_INFINITY
public static final Area NEGATIVE_INFINITY
public static final Area POS_MAXVALUE
public static final Area NEG_MAXVALUE
public Area(double value, AreaUnit unit)
value
- double valueunit
- unit for the double valuepublic Area(Area value)
value
- Scalar from which to construct this instancepublic final Area instantiateRel(double value, AreaUnit unit)
instantiateRel
in class AbstractDoubleScalarRel<AreaUnit,Area>
value
- the double valueunit
- the unitpublic static final Area createSI(double value)
value
- double value in SI unitspublic static Area interpolate(Area zero, Area one, double ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static Area max(Area r1, Area r2)
r1
- the first scalarr2
- the second scalarpublic static Area max(Area r1, Area r2, Area... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static Area min(Area r1, Area r2)
r1
- the first scalarr2
- the second scalarpublic static Area min(Area r1, Area r2, Area... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic final Dimensionless divideBy(Area v)
v
- Area scalarpublic final Volume multiplyBy(Length v)
v
- Area scalarpublic final Volume divideBy(LinearDensity v)
v
- Area scalarpublic final LinearDensity divideBy(Volume v)
v
- Area scalarpublic final Length divideBy(Length v)
v
- Area scalarpublic final Length multiplyBy(LinearDensity v)
v
- Area scalarpublic final FlowVolume multiplyBy(Speed v)
v
- Area scalarpublic final Force multiplyBy(Pressure v)
v
- Area scalarpublic final Money multiplyBy(MoneyPerArea v)
v
- Area scalarCopyright © 2015–2018 Delft University of Technology. All rights reserved.