public class ElectricalResistance extends AbstractDoubleScalarRel<ElectricalResistanceUnit,ElectricalResistance>
DoubleScalar.Rel<ElectricalResistanceUnit> value =
new DoubleScalar.Rel<ElectricalResistanceUnit>(100.0, ElectricalResistanceUnit.SI);
we can now write:
ElectricalResistance value = new ElectricalResistance(100.0, ElectricalResistanceUnit.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 ElectricalResistance |
NaN
constant with value NaN.
|
static ElectricalResistance |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static ElectricalResistance |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static ElectricalResistance |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static ElectricalResistance |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static ElectricalResistance |
ZERO
constant with value zero.
|
siNUMBER_PATTERN| Constructor and Description |
|---|
ElectricalResistance(double value,
ElectricalResistanceUnit unit)
Construct ElectricalResistance scalar.
|
ElectricalResistance(ElectricalResistance value)
Construct ElectricalResistance scalar.
|
| Modifier and Type | Method and Description |
|---|---|
static ElectricalResistance |
createSI(double value)
Construct ElectricalResistance scalar.
|
Dimensionless |
divideBy(ElectricalResistance v)
Calculate the division of ElectricalResistance and ElectricalResistance, which results in a Dimensionless scalar.
|
ElectricalResistance |
instantiateRel(double value,
ElectricalResistanceUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static ElectricalResistance |
interpolate(ElectricalResistance zero,
ElectricalResistance one,
double ratio)
Interpolate between two values.
|
static ElectricalResistance |
max(ElectricalResistance r1,
ElectricalResistance r2)
Return the maximum value of two relative scalars.
|
static ElectricalResistance |
max(ElectricalResistance r1,
ElectricalResistance r2,
ElectricalResistance... rn)
Return the maximum value of more than two relative scalars.
|
static ElectricalResistance |
min(ElectricalResistance r1,
ElectricalResistance r2)
Return the minimum value of two relative scalars.
|
static ElectricalResistance |
min(ElectricalResistance r1,
ElectricalResistance r2,
ElectricalResistance... rn)
Return the minimum value of more than two relative scalars.
|
ElectricalPotential |
multiplyBy(ElectricalCurrent v)
Calculate the multiplication of ElectricalResistance and ElectricalCurrent, which results in a ElectricalPotential
scalar.
|
static ElectricalResistance |
valueOf(String text)
Returns a ElectricalResistance representation of a textual representation of a value with a unit.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, plus, rint, roundcompareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocalebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final ElectricalResistance ZERO
public static final ElectricalResistance NaN
public static final ElectricalResistance POSITIVE_INFINITY
public static final ElectricalResistance NEGATIVE_INFINITY
public static final ElectricalResistance POS_MAXVALUE
public static final ElectricalResistance NEG_MAXVALUE
public ElectricalResistance(double value,
ElectricalResistanceUnit unit)
value - double valueunit - unit for the double valuepublic ElectricalResistance(ElectricalResistance value)
value - Scalar from which to construct this instancepublic final ElectricalResistance instantiateRel(double value, ElectricalResistanceUnit unit)
instantiateRel in class AbstractDoubleScalarRel<ElectricalResistanceUnit,ElectricalResistance>value - double; the double valueunit - U; the unitpublic static final ElectricalResistance createSI(double value)
value - double value in SI unitspublic static ElectricalResistance interpolate(ElectricalResistance zero, ElectricalResistance one, double ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static ElectricalResistance max(ElectricalResistance r1, ElectricalResistance r2)
r1 - the first scalarr2 - the second scalarpublic static ElectricalResistance max(ElectricalResistance r1, ElectricalResistance r2, ElectricalResistance... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static ElectricalResistance min(ElectricalResistance r1, ElectricalResistance r2)
r1 - the first scalarr2 - the second scalarpublic static ElectricalResistance min(ElectricalResistance r1, ElectricalResistance r2, ElectricalResistance... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static ElectricalResistance valueOf(String text) throws IllegalArgumentException
text - String; the textual representation to parse into a ElectricalResistanceIllegalArgumentException - when the text cannot be parsedpublic final Dimensionless divideBy(ElectricalResistance v)
v - ElectricalResistance scalarpublic final ElectricalPotential multiplyBy(ElectricalCurrent v)
v - ElectricalResistance scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.