public class Torque extends AbstractDoubleScalarRel<TorqueUnit,Torque>
DoubleScalar.Rel<TorqueUnit> value = new DoubleScalar.Rel<TorqueUnit>(100.0, TorqueUnit.SI);we can now write:
Torque value = new Torque(100.0, TorqueUnit.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 Torque |
NaN
constant with value NaN.
|
static Torque |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static Torque |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static Torque |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static Torque |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static Torque |
ZERO
constant with value zero.
|
siNUMBER_PATTERN| Constructor and Description |
|---|
Torque(double value,
TorqueUnit unit)
Construct Torque scalar.
|
Torque(Torque value)
Construct Torque scalar.
|
| Modifier and Type | Method and Description |
|---|---|
static Torque |
createSI(double value)
Construct Torque scalar.
|
Power |
divideBy(Duration v)
Calculate the division of Torque and Duration, which results in a Power scalar.
|
Length |
divideBy(Force v)
Calculate the division of Torque and Force, which results in a Length scalar.
|
Force |
divideBy(Length v)
Calculate the division of Torque and Length, which results in a Force scalar.
|
Duration |
divideBy(Power v)
Calculate the division of Torque and Power, which results in a Duration scalar.
|
Volume |
divideBy(Pressure v)
Calculate the division of Torque and Pressure, which results in a Volume scalar.
|
Dimensionless |
divideBy(Torque v)
Calculate the division of Torque and Torque, which results in a Dimensionless scalar.
|
Pressure |
divideBy(Volume v)
Calculate the division of Torque and Volume, which results in a Pressure scalar.
|
Torque |
instantiateRel(double value,
TorqueUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static Torque |
interpolate(Torque zero,
Torque one,
double ratio)
Interpolate between two values.
|
static Torque |
max(Torque r1,
Torque r2)
Return the maximum value of two relative scalars.
|
static Torque |
max(Torque r1,
Torque r2,
Torque... rn)
Return the maximum value of more than two relative scalars.
|
static Torque |
min(Torque r1,
Torque r2)
Return the minimum value of two relative scalars.
|
static Torque |
min(Torque r1,
Torque r2,
Torque... rn)
Return the minimum value of more than two relative scalars.
|
Power |
multiplyBy(Frequency v)
Calculate the multiplication of Torque and Frequency, which results in a Power scalar.
|
Force |
multiplyBy(LinearDensity v)
Calculate the multiplication of Torque and LinearDensity, which results in a Force scalar.
|
static Torque |
valueOf(String text)
Returns a Torque representation of a textual representation of a value with a unit.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, plus, rint, roundcompareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocalebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final Torque ZERO
public static final Torque NaN
public static final Torque POSITIVE_INFINITY
public static final Torque NEGATIVE_INFINITY
public static final Torque POS_MAXVALUE
public static final Torque NEG_MAXVALUE
public Torque(double value,
TorqueUnit unit)
value - double valueunit - unit for the double valuepublic Torque(Torque value)
value - Scalar from which to construct this instancepublic final Torque instantiateRel(double value, TorqueUnit unit)
instantiateRel in class AbstractDoubleScalarRel<TorqueUnit,Torque>value - double; the double valueunit - U; the unitpublic static final Torque createSI(double value)
value - double value in SI unitspublic static Torque interpolate(Torque zero, Torque one, double ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static Torque max(Torque r1, Torque r2)
r1 - the first scalarr2 - the second scalarpublic static Torque max(Torque r1, Torque r2, Torque... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static Torque min(Torque r1, Torque r2)
r1 - the first scalarr2 - the second scalarpublic static Torque min(Torque r1, Torque r2, Torque... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static Torque valueOf(String text) throws IllegalArgumentException
text - String; the textual representation to parse into a TorqueIllegalArgumentException - when the text cannot be parsedpublic final Dimensionless divideBy(Torque v)
v - Torque scalarpublic final Length divideBy(Force v)
v - Torque scalarpublic final Force divideBy(Length v)
v - Torque scalarpublic final Force multiplyBy(LinearDensity v)
v - Torque scalarpublic final Power divideBy(Duration v)
v - Torque scalarpublic final Duration divideBy(Power v)
v - Torque scalarpublic final Power multiplyBy(Frequency v)
v - Torque scalarpublic final Pressure divideBy(Volume v)
v - Torque scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.