public class FloatElectricalCharge extends TypedFloatScalarRel<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-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2016-05-28 14:25:52 +0200 (Sat, 28 May 2016) $, @version $Revision: 202 $, by $Author: averbraeck $,
initial version Sep 5, 2015
FloatScalar.Abs<U extends Unit<U>>, FloatScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
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 |
|---|---|
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.
|
protected FloatElectricalCharge |
instantiateTypeRel(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, plus, rint, roundcompareTo, eq, ge, getSI, gt, le, lt, minus, ne, plusdivide, divide, doubleValue, equals, floatValue, getInUnit, getInUnit, hashCode, interpolate, interpolate, intValue, longValue, minus, minus, minus, multiply, multiply, plus, plus, plus, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final FloatElectricalCharge ZERO
public FloatElectricalCharge(float value,
ElectricalChargeUnit unit)
value - float valueunit - unit for the float valuepublic FloatElectricalCharge(FloatElectricalCharge value)
value - Scalar from which to construct this instancepublic FloatElectricalCharge(double value,
ElectricalChargeUnit unit)
value - double valueunit - unit for the resulting float valueprotected final FloatElectricalCharge instantiateTypeRel(float value, ElectricalChargeUnit unit)
instantiateTypeRel in class TypedFloatScalarRel<ElectricalChargeUnit,FloatElectricalCharge>value - the float valueunit - the unitpublic static FloatElectricalCharge interpolate(FloatElectricalCharge zero, FloatElectricalCharge one, float ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static FloatElectricalCharge max(FloatElectricalCharge r1, FloatElectricalCharge r2)
r1 - the first scalarr2 - the second scalarpublic static FloatElectricalCharge max(FloatElectricalCharge r1, FloatElectricalCharge r2, FloatElectricalCharge... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static FloatElectricalCharge min(FloatElectricalCharge r1, FloatElectricalCharge r2)
r1 - the first scalarr2 - the second scalarpublic static FloatElectricalCharge min(FloatElectricalCharge r1, FloatElectricalCharge r2, FloatElectricalCharge... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final FloatDimensionless divideBy(FloatElectricalCharge v)
v - FloatElectricalCharge scalarpublic final FloatElectricalCurrent divideBy(FloatDuration v)
v - FloatElectricalCharge scalarpublic final FloatDuration divideBy(FloatElectricalCurrent v)
v - FloatElectricalCharge scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.