public class FloatEnergy extends TypedFloatScalarRel<EnergyUnit,FloatEnergy>
FloatScalar.Rel<EnergyUnit> value = new FloatScalar.Rel<EnergyUnit>(100.0, EnergyUnit.SI);we can now write:
FloatEnergy value = new FloatEnergy(100.0, EnergyUnit.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 FloatEnergy |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
FloatEnergy(double value,
EnergyUnit unit)
Construct FloatEnergy scalar using a double value.
|
FloatEnergy(FloatEnergy value)
Construct FloatEnergy scalar.
|
FloatEnergy(float value,
EnergyUnit unit)
Construct FloatEnergy scalar.
|
| Modifier and Type | Method and Description |
|---|---|
FloatPower |
divideBy(FloatDuration v)
Calculate the division of FloatEnergy and FloatDuration, which results in a FloatPower scalar.
|
FloatDimensionless |
divideBy(FloatEnergy v)
Calculate the division of FloatEnergy and FloatEnergy, which results in a FloatDimensionless scalar.
|
FloatLength |
divideBy(FloatForce v)
Calculate the division of FloatEnergy and FloatForce, which results in a FloatLength scalar.
|
FloatForce |
divideBy(FloatLength v)
Calculate the division of FloatEnergy and FloatLength, which results in a FloatForce scalar.
|
FloatDuration |
divideBy(FloatPower v)
Calculate the division of FloatEnergy and FloatPower, which results in a FloatDuration scalar.
|
FloatPressure |
divideBy(FloatVolume v)
Calculate the division of FloatEnergy and FloatVolume, which results in a FloatPressure scalar.
|
protected FloatEnergy |
instantiateTypeRel(float value,
EnergyUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatEnergy |
interpolate(FloatEnergy zero,
FloatEnergy one,
float ratio)
Interpolate between two values.
|
static FloatEnergy |
max(FloatEnergy r1,
FloatEnergy r2)
Return the maximum value of two relative scalars.
|
static FloatEnergy |
max(FloatEnergy r1,
FloatEnergy r2,
FloatEnergy... rn)
Return the maximum value of more than two relative scalars.
|
static FloatEnergy |
min(FloatEnergy r1,
FloatEnergy r2)
Return the minimum value of two relative scalars.
|
static FloatEnergy |
min(FloatEnergy r1,
FloatEnergy r2,
FloatEnergy... rn)
Return the minimum value of more than two relative scalars.
|
FloatPower |
multiplyBy(FloatFrequency v)
Calculate the multiplication of FloatEnergy and FloatFrequency, which results in a FloatPower scalar.
|
FloatForce |
multiplyBy(FloatLinearDensity v)
Calculate the multiplication of FloatEnergy and FloatLinearDensity, which results in a FloatForce scalar.
|
FloatMoney |
multiplyBy(FloatMoneyPerEnergy v)
Calculate the multiplication of FloatEnergy and FloatMoneyPerEnergy, which results in a FloatMoney scalar.
|
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 FloatEnergy ZERO
public FloatEnergy(float value,
EnergyUnit unit)
value - float valueunit - unit for the float valuepublic FloatEnergy(FloatEnergy value)
value - Scalar from which to construct this instancepublic FloatEnergy(double value,
EnergyUnit unit)
value - double valueunit - unit for the resulting float valueprotected final FloatEnergy instantiateTypeRel(float value, EnergyUnit unit)
instantiateTypeRel in class TypedFloatScalarRel<EnergyUnit,FloatEnergy>value - the float valueunit - the unitpublic static FloatEnergy interpolate(FloatEnergy zero, FloatEnergy one, float ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static FloatEnergy max(FloatEnergy r1, FloatEnergy r2)
r1 - the first scalarr2 - the second scalarpublic static FloatEnergy max(FloatEnergy r1, FloatEnergy r2, FloatEnergy... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static FloatEnergy min(FloatEnergy r1, FloatEnergy r2)
r1 - the first scalarr2 - the second scalarpublic static FloatEnergy min(FloatEnergy r1, FloatEnergy r2, FloatEnergy... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final FloatDimensionless divideBy(FloatEnergy v)
v - FloatEnergy scalarpublic final FloatLength divideBy(FloatForce v)
v - FloatEnergy scalarpublic final FloatForce divideBy(FloatLength v)
v - FloatEnergy scalarpublic final FloatForce multiplyBy(FloatLinearDensity v)
v - FloatEnergy scalarpublic final FloatPower divideBy(FloatDuration v)
v - FloatEnergy scalarpublic final FloatDuration divideBy(FloatPower v)
v - FloatEnergy scalarpublic final FloatPressure divideBy(FloatVolume v)
v - FloatEnergy scalarpublic final FloatPower multiplyBy(FloatFrequency v)
v - FloatEnergy scalarpublic final FloatMoney multiplyBy(FloatMoneyPerEnergy v)
v - FloatEnergy scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.