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-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
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; double valueunit
- AreaUnit; unit for the double valuepublic Area(Area value)
value
- Area; Scalar from which to construct this instancepublic final Area instantiateRel(double value, AreaUnit unit)
instantiateRel
in class AbstractDoubleScalarRel<AreaUnit,Area>
value
- double; the double valueunit
- U; the unitpublic static final Area createSI(double value)
value
- double; double value in SI unitspublic static Area interpolate(Area zero, Area one, double ratio)
zero
- Area; the low valueone
- Area; the high valueratio
- double; the ratio between 0 and 1, inclusivepublic static Area max(Area r1, Area r2)
r1
- Area; the first scalarr2
- Area; the second scalarpublic static Area max(Area r1, Area r2, Area... rn)
r1
- Area; the first scalarr2
- Area; the second scalarrn
- Area...; the other scalarspublic static Area min(Area r1, Area r2)
r1
- Area; the first scalarr2
- Area; the second scalarpublic static Area min(Area r1, Area r2, Area... rn)
r1
- Area; the first scalarr2
- Area; the second scalarrn
- Area...; the other scalarspublic final Dimensionless divideBy(Area v)
v
- Area; Area scalarpublic final Volume multiplyBy(Length v)
v
- Length; Area scalarpublic final Volume divideBy(LinearDensity v)
v
- LinearDensity; Area scalarpublic final LinearDensity divideBy(Volume v)
v
- Volume; Area scalarpublic final Length divideBy(Length v)
v
- Length; Area scalarpublic final Length multiplyBy(LinearDensity v)
v
- LinearDensity; Area scalarpublic final FlowVolume multiplyBy(Speed v)
v
- Speed; Area scalarpublic final Force multiplyBy(Pressure v)
v
- Pressure; Area scalarpublic final Money multiplyBy(MoneyPerArea v)
v
- MoneyPerArea; Area scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.