Package org.djunits.demo.website
Class Jerk
- java.lang.Object
-
- java.lang.Number
-
- org.djunits.value.AbstractScalar<U,S>
-
- org.djunits.value.vdouble.scalar.base.AbstractDoubleScalar<U,R>
-
- org.djunits.value.vdouble.scalar.base.AbstractDoubleScalarRel<JerkUnit,Jerk>
-
- org.djunits.demo.website.Jerk
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Jerk>,Scalar<JerkUnit,Jerk>,Scalar.Rel<JerkUnit,Jerk>,ValueFunctions<JerkUnit,Jerk>,Relative<JerkUnit,Jerk>,Value<JerkUnit,Jerk>,DoubleScalarInterface<JerkUnit,Jerk>,DoubleScalarInterface.Rel<JerkUnit,Jerk>
public class Jerk extends AbstractDoubleScalarRel<JerkUnit,Jerk>
Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.djunits.value.vdouble.scalar.base.DoubleScalarInterface
DoubleScalarInterface.Abs<AU extends AbsoluteLinearUnit<AU,RU>,A extends DoubleScalarInterface.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends DoubleScalarInterface.RelWithAbs<AU,A,RU,R>>, DoubleScalarInterface.Rel<U extends Unit<U>,R extends DoubleScalarInterface.Rel<U,R>>, DoubleScalarInterface.RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends DoubleScalarInterface.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends DoubleScalarInterface.RelWithAbs<AU,A,RU,R>>
-
Nested classes/interfaces inherited from interface org.djunits.value.base.Scalar
Scalar.Abs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends Scalar.RelWithAbs<AU,A,RU,R>>, Scalar.Rel<U extends Unit<U>,R extends Scalar.Rel<U,R>>, Scalar.RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends Scalar.RelWithAbs<AU,A,RU,R>>
-
-
Field Summary
-
Fields inherited from class org.djunits.value.vdouble.scalar.base.AbstractDoubleScalar
si
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Dimensionlessdivide(Jerk v)Calculate the division of Jerk and Jerk, which results in a Dimensionless scalar.JerkinstantiateRel(double value, JerkUnit unit)static JerkinstantiateSI(double value)Construct Jerk scalar.static Jerkinterpolate(Jerk zero, Jerk one, double ratio)Interpolate between two values.static Jerkmax(Jerk r1, Jerk r2)Return the maximum value of two relative scalars.static Jerkmax(Jerk r1, Jerk r2, Jerk... rn)Return the maximum value of more than two relative scalars.static Jerkmin(Jerk r1, Jerk r2)Return the minimum value of two relative scalars.static Jerkmin(Jerk r1, Jerk r2, Jerk... rn)Return the minimum value of more than two relative scalars.static Jerkof(double value, String unitString)Returns a Jerk based on a value and the textual representation of the unit.SIScalarreciprocal()Frequencytimes(Acceleration v)Calculate the division of Jerk and Acceleration, which results in a Frequency scalar.Accelerationtimes(Duration v)Calculate the multiplication of Jerk and Duration, which results in an Acceleration scalar.static JerkvalueOf(String text)Returns a Jerk representation of a textual representation of a value with a unit.-
Methods inherited from class org.djunits.value.vdouble.scalar.base.AbstractDoubleScalarRel
abs, ceil, divide, divide, divide, floor, minus, neg, plus, rint, times, times, times
-
Methods inherited from class org.djunits.value.vdouble.scalar.base.AbstractDoubleScalar
compareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toDisplayString, toDisplayString, toString, toString, toString, toString, toStringSIPrefixed, toStringSIPrefixed, toTextualString, toTextualString
-
Methods inherited from class org.djunits.value.AbstractScalar
getDisplayUnit, isAbsolute, isRelative, setDisplayUnit
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.djunits.value.vdouble.scalar.base.DoubleScalarInterface
getInUnit, getInUnit, getSI
-
Methods inherited from interface org.djunits.value.base.Scalar
eq, eq0, ge, ge0, gt, gt0, le, le0, lt, lt0, ne, ne0, toDisplayString, toDisplayString, toTextualString, toTextualString
-
Methods inherited from interface org.djunits.value.Value
getDisplayUnit, isAbsolute, isRelative, setDisplayUnit, toString, toString, toString, toString
-
-
-
-
Constructor Detail
-
Jerk
public Jerk(double value, JerkUnit unit)Construct Jerk scalar.- Parameters:
value- double; the double valueunit- JerkUnit; unit for the double value
-
Jerk
public Jerk(Jerk value)
Construct Jerk scalar.- Parameters:
value- Jerk; Scalar from which to construct this instance
-
-
Method Detail
-
instantiateSI
public static final Jerk instantiateSI(double value)
Construct Jerk scalar.- Parameters:
value- double; the double value in SI units- Returns:
- Jerk; the new scalar with the SI value
-
interpolate
public static Jerk interpolate(Jerk zero, Jerk one, double ratio)
Interpolate between two values.- Parameters:
zero- Jerk; the low valueone- Jerk; the high valueratio- double; the ratio between 0 and 1, inclusive- Returns:
- Jerk; a Scalar at the ratio between
-
max
public static Jerk max(Jerk r1, Jerk r2)
Return the maximum value of two relative scalars.- Parameters:
r1- Jerk; the first scalarr2- Jerk; the second scalar- Returns:
- Jerk; the maximum value of two relative scalars
-
max
public static Jerk max(Jerk r1, Jerk r2, Jerk... rn)
Return the maximum value of more than two relative scalars.- Parameters:
r1- Jerk; the first scalarr2- Jerk; the second scalarrn- Jerk...; the other scalars- Returns:
- Jerk; the maximum value of more than two relative scalars
-
min
public static Jerk min(Jerk r1, Jerk r2)
Return the minimum value of two relative scalars.- Parameters:
r1- Jerk; the first scalarr2- Jerk; the second scalar- Returns:
- Jerk; the minimum value of two relative scalars
-
min
public static Jerk min(Jerk r1, Jerk r2, Jerk... rn)
Return the minimum value of more than two relative scalars.- Parameters:
r1- Jerk; the first scalarr2- Jerk; the second scalarrn- Jerk...; the other scalars- Returns:
- Jerk; the minimum value of more than two relative scalars
-
valueOf
public static Jerk valueOf(String text)
Returns a Jerk representation of a textual representation of a value with a unit. The String representation that can be parsed is the double value in the unit, followed by the official abbreviation of the unit. Spaces are allowed, but not required, between the value and the unit.- Parameters:
text- String; the textual representation to parse into a Jerk- Returns:
- Jerk; the Scalar representation of the value in its unit
- Throws:
IllegalArgumentException- when the text cannot be parsedNullPointerException- when the text argument is null
-
of
public static Jerk of(double value, String unitString)
Returns a Jerk based on a value and the textual representation of the unit.- Parameters:
value- double; the value to useunitString- String; the textual representation of the unit- Returns:
- Jerk; the Scalar representation of the value in its unit
- Throws:
IllegalArgumentException- when the unit cannot be parsed or is incorrectNullPointerException- when the unitString argument is null
-
divide
public final Dimensionless divide(Jerk v)
Calculate the division of Jerk and Jerk, which results in a Dimensionless scalar.- Parameters:
v- Jerk; Jerk scalar- Returns:
- Dimensionless scalar as a division of Jerk and Jerk
-
times
public final Acceleration times(Duration v)
Calculate the multiplication of Jerk and Duration, which results in an Acceleration scalar.- Parameters:
v- Duration; Duration scalar- Returns:
- Acceleration scalar as a multiplication of Jerk and Duration
-
times
public final Frequency times(Acceleration v)
Calculate the division of Jerk and Acceleration, which results in a Frequency scalar.- Parameters:
v- Acceleration; Acceleration scalar- Returns:
- Frequency scalar as a division of Jerk and Accelration
-
reciprocal
public SIScalar reciprocal()
- Specified by:
reciprocalin classAbstractDoubleScalarRel<JerkUnit,Jerk>
-
-