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-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 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
NUMBER_PATTERN
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.
|
static FloatFrequency |
valueOf(String text)
Returns a FloatFrequency 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 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 valueunit
- unit for the float valuepublic FloatFrequency(FloatFrequency value)
value
- Scalar from which to construct this instancepublic FloatFrequency(double value, FrequencyUnit unit)
value
- double valueunit
- 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 value in SI unitspublic static FloatFrequency interpolate(FloatFrequency zero, FloatFrequency one, float ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static FloatFrequency max(FloatFrequency r1, FloatFrequency r2)
r1
- the first scalarr2
- the second scalarpublic static FloatFrequency max(FloatFrequency r1, FloatFrequency r2, FloatFrequency... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatFrequency min(FloatFrequency r1, FloatFrequency r2)
r1
- the first scalarr2
- the second scalarpublic static FloatFrequency min(FloatFrequency r1, FloatFrequency r2, FloatFrequency... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatFrequency valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a FloatFrequencyIllegalArgumentException
- when the text cannot be parsedpublic final FloatDimensionless divideBy(FloatFrequency v)
v
- FloatFrequency scalarpublic final FloatDimensionless multiplyBy(FloatDuration v)
v
- FloatFrequency scalarpublic final FloatSpeed multiplyBy(FloatLength v)
v
- FloatFrequency scalarpublic final FloatAcceleration multiplyBy(FloatSpeed v)
v
- FloatFrequency scalarpublic final FloatPower multiplyBy(FloatEnergy v)
v
- FloatFrequency scalarpublic final FloatMoneyPerDuration multiplyBy(FloatMoney v)
v
- FloatFrequency scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.