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-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 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
NUMBER_PATTERN
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.
|
static ElectricalCurrent |
valueOf(String text)
Returns a ElectricalCurrent 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 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 valueunit
- unit for the double valuepublic ElectricalCurrent(ElectricalCurrent value)
value
- 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 value in SI unitspublic static ElectricalCurrent interpolate(ElectricalCurrent zero, ElectricalCurrent one, double ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static ElectricalCurrent max(ElectricalCurrent r1, ElectricalCurrent r2)
r1
- the first scalarr2
- the second scalarpublic static ElectricalCurrent max(ElectricalCurrent r1, ElectricalCurrent r2, ElectricalCurrent... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static ElectricalCurrent min(ElectricalCurrent r1, ElectricalCurrent r2)
r1
- the first scalarr2
- the second scalarpublic static ElectricalCurrent min(ElectricalCurrent r1, ElectricalCurrent r2, ElectricalCurrent... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static ElectricalCurrent valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a ElectricalCurrentIllegalArgumentException
- when the text cannot be parsedpublic final Dimensionless divideBy(ElectricalCurrent v)
v
- ElectricalCurrent scalarpublic final Power multiplyBy(ElectricalPotential v)
v
- ElectricalCurrent scalarpublic final ElectricalCharge multiplyBy(Duration v)
v
- ElectricalCurrent scalarpublic final ElectricalPotential multiplyBy(ElectricalResistance v)
v
- ElectricalCurrent scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.