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