public class Force extends AbstractDoubleScalarRel<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-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 Force |
NaN
constant with value NaN.
|
static Force |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static Force |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static Force |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static Force |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
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 |
---|---|
static Force |
createSI(double value)
Construct Force scalar.
|
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.
|
Force |
instantiateRel(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, 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 Force ZERO
public static final Force NaN
public static final Force POSITIVE_INFINITY
public static final Force NEGATIVE_INFINITY
public static final Force POS_MAXVALUE
public static final Force NEG_MAXVALUE
public Force(double value, ForceUnit unit)
value
- double; double valueunit
- ForceUnit; unit for the double valuepublic Force(Force value)
value
- Force; Scalar from which to construct this instancepublic final Force instantiateRel(double value, ForceUnit unit)
instantiateRel
in class AbstractDoubleScalarRel<ForceUnit,Force>
value
- double; the double valueunit
- U; the unitpublic static final Force createSI(double value)
value
- double; double value in SI unitspublic static Force interpolate(Force zero, Force one, double ratio)
zero
- Force; the low valueone
- Force; the high valueratio
- double; the ratio between 0 and 1, inclusivepublic static Force max(Force r1, Force r2)
r1
- Force; the first scalarr2
- Force; the second scalarpublic static Force max(Force r1, Force r2, Force... rn)
r1
- Force; the first scalarr2
- Force; the second scalarrn
- Force...; the other scalarspublic static Force min(Force r1, Force r2)
r1
- Force; the first scalarr2
- Force; the second scalarpublic static Force min(Force r1, Force r2, Force... rn)
r1
- Force; the first scalarr2
- Force; the second scalarrn
- Force...; the other scalarspublic final Dimensionless divideBy(Force v)
v
- Force; Force scalarpublic final Energy multiplyBy(Length v)
v
- Length; Force scalarpublic final Energy divideBy(LinearDensity v)
v
- LinearDensity; Force scalarpublic final LinearDensity divideBy(Energy v)
v
- Energy; Force scalarpublic final Power multiplyBy(Speed v)
v
- Speed; Force scalarpublic final Acceleration divideBy(Mass v)
v
- Mass; Force scalarpublic final Mass divideBy(Acceleration v)
v
- Acceleration; Force scalarpublic final Pressure divideBy(Area v)
v
- Area; Force scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.