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