public class Force extends TypedDoubleScalarRel<ForceUnit,Force>
DoubleScalar.Rel<ForceUnit> value = new DoubleScalar.Rel<ForceUnit>(100.0, ForceUnit.SI);we can now write:
Force value = new Force(100.0, ForceUnit.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
DoubleScalar.Abs<U extends Unit<U>>, DoubleScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
static Force |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
Force(double value,
ForceUnit unit)
Construct Force scalar.
|
Force(Force value)
Construct Force scalar.
|
| Modifier and Type | Method and Description |
|---|---|
Mass |
divideBy(Acceleration v)
Calculate the division of Force and Acceleration, which results in a Mass scalar.
|
Pressure |
divideBy(Area v)
Calculate the division of Force and Area, which results in a Pressure scalar.
|
LinearDensity |
divideBy(Energy v)
Calculate the division of Force and Energy, which results in a LinearDensity scalar.
|
Dimensionless |
divideBy(Force v)
Calculate the division of Force and Force, which results in a Dimensionless scalar.
|
Energy |
divideBy(LinearDensity v)
Calculate the division of Force and LinearDensity, which results in a Energy scalar.
|
Acceleration |
divideBy(Mass v)
Calculate the division of Force and Mass, which results in a Acceleration scalar.
|
Area |
divideBy(Pressure v)
Calculate the division of Force and Pressure, which results in a Area scalar.
|
protected Force |
instantiateTypeRel(double value,
ForceUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static Force |
interpolate(Force zero,
Force one,
double ratio)
Interpolate between two values.
|
static Force |
max(Force r1,
Force r2)
Return the maximum value of two relative scalars.
|
static Force |
max(Force r1,
Force r2,
Force... rn)
Return the maximum value of more than two relative scalars.
|
static Force |
min(Force r1,
Force r2)
Return the minimum value of two relative scalars.
|
static Force |
min(Force r1,
Force r2,
Force... rn)
Return the minimum value of more than two relative scalars.
|
Energy |
multiplyBy(Length v)
Calculate the multiplication of Force and Length, which results in a Energy scalar.
|
Power |
multiplyBy(Speed v)
Calculate the multiplication of Force and Speed, which results in a Power 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 Force ZERO
public Force(double value,
ForceUnit unit)
value - double valueunit - unit for the double valuepublic Force(Force value)
value - Scalar from which to construct this instanceprotected final Force instantiateTypeRel(double value, ForceUnit unit)
instantiateTypeRel in class TypedDoubleScalarRel<ForceUnit,Force>value - the double valueunit - the unitpublic static Force interpolate(Force zero, Force one, double ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static Force max(Force r1, Force r2)
r1 - the first scalarr2 - the second scalarpublic static Force max(Force r1, Force r2, Force... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static Force min(Force r1, Force r2)
r1 - the first scalarr2 - the second scalarpublic static Force min(Force r1, Force r2, Force... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final Dimensionless divideBy(Force v)
v - Force scalarpublic final Energy multiplyBy(Length v)
v - Force scalarpublic final Energy divideBy(LinearDensity v)
v - Force scalarpublic final LinearDensity divideBy(Energy v)
v - Force scalarpublic final Power multiplyBy(Speed v)
v - Force scalarpublic final Acceleration divideBy(Mass v)
v - Force scalarpublic final Mass divideBy(Acceleration v)
v - Force scalarpublic final Pressure divideBy(Area v)
v - Force scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.