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