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-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 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; float valueunit
- LinearDensityUnit; unit for the float valuepublic FloatLinearDensity(FloatLinearDensity value)
value
- FloatLinearDensity; Scalar from which to construct this instancepublic FloatLinearDensity(double value, LinearDensityUnit unit)
value
- double; double valueunit
- LinearDensityUnit; unit for the resulting float valuepublic final FloatLinearDensity instantiateRel(float value, LinearDensityUnit unit)
instantiateRel
in class AbstractFloatScalarRel<LinearDensityUnit,FloatLinearDensity>
value
- float; the float valueunit
- U; the unitpublic static final FloatLinearDensity createSI(float value)
value
- float; float value in SI unitspublic static FloatLinearDensity interpolate(FloatLinearDensity zero, FloatLinearDensity one, float ratio)
zero
- FloatLinearDensity; the low valueone
- FloatLinearDensity; the high valueratio
- float; the ratio between 0 and 1, inclusivepublic static FloatLinearDensity max(FloatLinearDensity r1, FloatLinearDensity r2)
r1
- FloatLinearDensity; the first scalarr2
- FloatLinearDensity; the second scalarpublic static FloatLinearDensity max(FloatLinearDensity r1, FloatLinearDensity r2, FloatLinearDensity... rn)
r1
- FloatLinearDensity; the first scalarr2
- FloatLinearDensity; the second scalarrn
- FloatLinearDensity...; the other scalarspublic static FloatLinearDensity min(FloatLinearDensity r1, FloatLinearDensity r2)
r1
- FloatLinearDensity; the first scalarr2
- FloatLinearDensity; the second scalarpublic static FloatLinearDensity min(FloatLinearDensity r1, FloatLinearDensity r2, FloatLinearDensity... rn)
r1
- FloatLinearDensity; the first scalarr2
- FloatLinearDensity; the second scalarrn
- FloatLinearDensity...; the other scalarspublic final FloatDimensionless divideBy(FloatLinearDensity v)
v
- FloatLinearDensity; FloatLinearDensity scalarpublic final FloatLength multiplyBy(FloatArea v)
v
- FloatArea; FloatLinearDensity scalarpublic final FloatForce multiplyBy(FloatEnergy v)
v
- FloatEnergy; FloatLinearDensity scalarpublic final FloatFrequency multiplyBy(FloatSpeed v)
v
- FloatSpeed; FloatLinearDensity scalarpublic final FloatMoneyPerLength multiplyBy(FloatMoney v)
v
- FloatMoney; FloatLinearDensity scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.