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