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