1 package org.djunits.demo.website;
2
3 import org.djunits.value.vdouble.vector.base.AbstractDoubleVectorRel;
4 import org.djunits.value.vdouble.vector.data.DoubleVectorData;
5
6 /**
7 * Double JerkVector, a vector of values with a JerkUnit.
8 * <p>
9 * Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
10 * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>.
11 * </p>
12 * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
13 * @author <a href="https://www.tudelft.nl/staff/p.knoppers/">Peter Knoppers</a>
14 */
15 public class JerkVector extends AbstractDoubleVectorRel<JerkUnit, Jerk, JerkVector>
16 {
17 /** */
18 private static final long serialVersionUID = 20190905L;
19
20 /**
21 * Construct an JerkVector from an internal data object.
22 * @param data DoubleVectorData; the internal data object for the vector data
23 * @param displayUnit JerkUnit; the display unit of the vector data
24 */
25 public JerkVector(final DoubleVectorData data, final JerkUnit displayUnit)
26 {
27 super(data, displayUnit);
28 }
29
30 /** {@inheritDoc} */
31 @Override
32 public Class<Jerk> getScalarClass()
33 {
34 return Jerk.class;
35 }
36
37 /** {@inheritDoc} */
38 @Override
39 public JerkVector instantiateVector(final DoubleVectorData dvd, final JerkUnit displayUnit)
40 {
41 return new JerkVector(dvd, displayUnit);
42 }
43
44 /** {@inheritDoc} */
45 @Override
46 public Jerk instantiateScalarSI(final double valueSI, final JerkUnit displayUnit)
47 {
48 Jerk result = Jerk.instantiateSI(valueSI);
49 result.setDisplayUnit(displayUnit);
50 return result;
51 }
52
53 }