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-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 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
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.
|
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 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; double valueunit
- ElectricalPotentialUnit; unit for the double valuepublic ElectricalPotential(ElectricalPotential value)
value
- ElectricalPotential; 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; double value in SI unitspublic static ElectricalPotential interpolate(ElectricalPotential zero, ElectricalPotential one, double ratio)
zero
- ElectricalPotential; the low valueone
- ElectricalPotential; the high valueratio
- double; the ratio between 0 and 1, inclusivepublic static ElectricalPotential max(ElectricalPotential r1, ElectricalPotential r2)
r1
- ElectricalPotential; the first scalarr2
- ElectricalPotential; the second scalarpublic static ElectricalPotential max(ElectricalPotential r1, ElectricalPotential r2, ElectricalPotential... rn)
r1
- ElectricalPotential; the first scalarr2
- ElectricalPotential; the second scalarrn
- ElectricalPotential...; the other scalarspublic static ElectricalPotential min(ElectricalPotential r1, ElectricalPotential r2)
r1
- ElectricalPotential; the first scalarr2
- ElectricalPotential; the second scalarpublic static ElectricalPotential min(ElectricalPotential r1, ElectricalPotential r2, ElectricalPotential... rn)
r1
- ElectricalPotential; the first scalarr2
- ElectricalPotential; the second scalarrn
- ElectricalPotential...; the other scalarspublic final Dimensionless divideBy(ElectricalPotential v)
v
- ElectricalPotential; ElectricalPotential scalarpublic final Power multiplyBy(ElectricalCurrent v)
v
- ElectricalCurrent; ElectricalPotential scalarpublic final ElectricalResistance divideBy(ElectricalCurrent v)
v
- ElectricalCurrent; ElectricalPotential scalarpublic final ElectricalCurrent divideBy(ElectricalResistance v)
v
- ElectricalResistance; ElectricalPotential scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.