public class LinearDensity extends AbstractDoubleScalarRel<LinearDensityUnit,LinearDensity>
DoubleScalar.Rel<LinearDensityUnit> value = new DoubleScalar.Rel<LinearDensityUnit>(100.0, LinearDensityUnit.SI);we can now write:
LinearDensity value = new LinearDensity(100.0, LinearDensityUnit.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 LinearDensity |
NaN
constant with value NaN.
|
static LinearDensity |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static LinearDensity |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static LinearDensity |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static LinearDensity |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static LinearDensity |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
LinearDensity(double value,
LinearDensityUnit unit)
Construct LinearDensity scalar.
|
LinearDensity(LinearDensity value)
Construct LinearDensity scalar.
|
| Modifier and Type | Method and Description |
|---|---|
static LinearDensity |
createSI(double value)
Construct LinearDensity scalar.
|
Dimensionless |
divideBy(LinearDensity v)
Calculate the division of LinearDensity and LinearDensity, which results in a Dimensionless scalar.
|
LinearDensity |
instantiateRel(double value,
LinearDensityUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static LinearDensity |
interpolate(LinearDensity zero,
LinearDensity one,
double ratio)
Interpolate between two values.
|
static LinearDensity |
max(LinearDensity r1,
LinearDensity r2)
Return the maximum value of two relative scalars.
|
static LinearDensity |
max(LinearDensity r1,
LinearDensity r2,
LinearDensity... rn)
Return the maximum value of more than two relative scalars.
|
static LinearDensity |
min(LinearDensity r1,
LinearDensity r2)
Return the minimum value of two relative scalars.
|
static LinearDensity |
min(LinearDensity r1,
LinearDensity r2,
LinearDensity... rn)
Return the minimum value of more than two relative scalars.
|
Length |
multiplyBy(Area v)
Calculate the multiplication of LinearDensity and Area, which results in a Length scalar.
|
Force |
multiplyBy(Energy v)
Calculate the multiplication of LinearDensity and Energy, which results in a Force scalar.
|
MoneyPerLength |
multiplyBy(Money v)
Calculate the multiplication of LinearDensity and Money, which results in a MoneyPerLength scalar.
|
Frequency |
multiplyBy(Speed v)
Calculate the multiplication of LinearDensity and Speed, which results in a Frequency scalar.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, plus, rint, roundcompareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitbyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final LinearDensity ZERO
public static final LinearDensity NaN
public static final LinearDensity POSITIVE_INFINITY
public static final LinearDensity NEGATIVE_INFINITY
public static final LinearDensity POS_MAXVALUE
public static final LinearDensity NEG_MAXVALUE
public LinearDensity(double value,
LinearDensityUnit unit)
value - double; double valueunit - LinearDensityUnit; unit for the double valuepublic LinearDensity(LinearDensity value)
value - LinearDensity; Scalar from which to construct this instancepublic final LinearDensity instantiateRel(double value, LinearDensityUnit unit)
instantiateRel in class AbstractDoubleScalarRel<LinearDensityUnit,LinearDensity>value - double; the double valueunit - U; the unitpublic static final LinearDensity createSI(double value)
value - double; double value in SI unitspublic static LinearDensity interpolate(LinearDensity zero, LinearDensity one, double ratio)
zero - LinearDensity; the low valueone - LinearDensity; the high valueratio - double; the ratio between 0 and 1, inclusivepublic static LinearDensity max(LinearDensity r1, LinearDensity r2)
r1 - LinearDensity; the first scalarr2 - LinearDensity; the second scalarpublic static LinearDensity max(LinearDensity r1, LinearDensity r2, LinearDensity... rn)
r1 - LinearDensity; the first scalarr2 - LinearDensity; the second scalarrn - LinearDensity...; the other scalarspublic static LinearDensity min(LinearDensity r1, LinearDensity r2)
r1 - LinearDensity; the first scalarr2 - LinearDensity; the second scalarpublic static LinearDensity min(LinearDensity r1, LinearDensity r2, LinearDensity... rn)
r1 - LinearDensity; the first scalarr2 - LinearDensity; the second scalarrn - LinearDensity...; the other scalarspublic final Dimensionless divideBy(LinearDensity v)
v - LinearDensity; LinearDensity scalarpublic final Length multiplyBy(Area v)
v - Area; LinearDensity scalarpublic final Force multiplyBy(Energy v)
v - Energy; LinearDensity scalarpublic final Frequency multiplyBy(Speed v)
v - Speed; LinearDensity scalarpublic final MoneyPerLength multiplyBy(Money v)
v - Money; LinearDensity scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.