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