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