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