public class FloatArea extends AbstractFloatScalarRel<AreaUnit,FloatArea>
FloatScalar.Rel<AreaUnit> value = new FloatScalar.Rel<AreaUnit>(100.0, AreaUnit.SI);we can now write:
FloatArea value = new FloatArea(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-03-03 00:53:50 +0100 (Sun, 03 Mar 2019) $, @version $Revision: 349 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static FloatArea |
NaN
constant with value NaN.
|
static FloatArea |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static FloatArea |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static FloatArea |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static FloatArea |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static FloatArea |
ZERO
constant with value zero.
|
si
NUMBER_PATTERN
Constructor and Description |
---|
FloatArea(double value,
AreaUnit unit)
Construct FloatArea scalar using a double value.
|
FloatArea(FloatArea value)
Construct FloatArea scalar.
|
FloatArea(float value,
AreaUnit unit)
Construct FloatArea scalar.
|
Modifier and Type | Method and Description |
---|---|
static FloatArea |
createSI(float value)
Construct FloatArea scalar.
|
FloatDimensionless |
divideBy(FloatArea v)
Calculate the division of FloatArea and FloatArea, which results in a FloatDimensionless scalar.
|
FloatLength |
divideBy(FloatLength v)
Calculate the division of FloatArea and FloatLength, which results in a FloatLength scalar.
|
FloatVolume |
divideBy(FloatLinearDensity v)
Calculate the division of FloatArea and FloatLinearDensity, which results in a FloatVolume scalar.
|
FloatLinearDensity |
divideBy(FloatVolume v)
Calculate the division of FloatArea and FloatVolume, which results in a FloatLinearDensity scalar.
|
FloatArea |
instantiateRel(float value,
AreaUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatArea |
interpolate(FloatArea zero,
FloatArea one,
float ratio)
Interpolate between two values.
|
static FloatArea |
max(FloatArea r1,
FloatArea r2)
Return the maximum value of two relative scalars.
|
static FloatArea |
max(FloatArea r1,
FloatArea r2,
FloatArea... rn)
Return the maximum value of more than two relative scalars.
|
static FloatArea |
min(FloatArea r1,
FloatArea r2)
Return the minimum value of two relative scalars.
|
static FloatArea |
min(FloatArea r1,
FloatArea r2,
FloatArea... rn)
Return the minimum value of more than two relative scalars.
|
FloatVolume |
multiplyBy(FloatLength v)
Calculate the multiplication of FloatArea and FloatLength, which results in a FloatVolume scalar.
|
FloatLength |
multiplyBy(FloatLinearDensity v)
Calculate the multiplication of FloatArea and FloatLinearDensity, which results in a FloatLength scalar.
|
FloatMoney |
multiplyBy(FloatMoneyPerArea v)
Calculate the multiplication of FloatArea and FloatMoneyPerArea, which results in a FloatMoney scalar.
|
FloatForce |
multiplyBy(FloatPressure v)
Calculate the multiplication of FloatArea and FloatPressure, which results in a FloatForce scalar.
|
FloatFlowVolume |
multiplyBy(FloatSpeed v)
Calculate the multiplication of FloatArea and FloatSpeed, which results in a FloatFlowVolume scalar.
|
static FloatArea |
valueOf(String text)
Returns a FloatArea representation of a textual representation of a value with a unit.
|
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, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocale
byteValue, shortValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
DIV, MULT, POW
public static final FloatArea ZERO
public static final FloatArea NaN
public static final FloatArea POSITIVE_INFINITY
public static final FloatArea NEGATIVE_INFINITY
public static final FloatArea POS_MAXVALUE
public static final FloatArea NEG_MAXVALUE
public FloatArea(float value, AreaUnit unit)
value
- float valueunit
- unit for the float valuepublic FloatArea(FloatArea value)
value
- Scalar from which to construct this instancepublic FloatArea(double value, AreaUnit unit)
value
- double valueunit
- unit for the resulting float valuepublic final FloatArea instantiateRel(float value, AreaUnit unit)
instantiateRel
in class AbstractFloatScalarRel<AreaUnit,FloatArea>
value
- float; the float valueunit
- U; the unitpublic static final FloatArea createSI(float value)
value
- float value in SI unitspublic static FloatArea interpolate(FloatArea zero, FloatArea one, float ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static FloatArea max(FloatArea r1, FloatArea r2)
r1
- the first scalarr2
- the second scalarpublic static FloatArea max(FloatArea r1, FloatArea r2, FloatArea... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatArea min(FloatArea r1, FloatArea r2)
r1
- the first scalarr2
- the second scalarpublic static FloatArea min(FloatArea r1, FloatArea r2, FloatArea... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatArea valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a FloatAreaIllegalArgumentException
- when the text cannot be parsedpublic final FloatDimensionless divideBy(FloatArea v)
v
- FloatArea scalarpublic final FloatVolume multiplyBy(FloatLength v)
v
- FloatArea scalarpublic final FloatVolume divideBy(FloatLinearDensity v)
v
- FloatArea scalarpublic final FloatLinearDensity divideBy(FloatVolume v)
v
- FloatArea scalarpublic final FloatLength divideBy(FloatLength v)
v
- FloatArea scalarpublic final FloatLength multiplyBy(FloatLinearDensity v)
v
- FloatArea scalarpublic final FloatFlowVolume multiplyBy(FloatSpeed v)
v
- FloatArea scalarpublic final FloatForce multiplyBy(FloatPressure v)
v
- FloatArea scalarpublic final FloatMoney multiplyBy(FloatMoneyPerArea v)
v
- FloatArea scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.