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