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