View Javadoc
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-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
10   * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim 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      /** */
19      private static final long serialVersionUID = 20190905L;
20  
21      /**
22       * Construct an JerkVector from an internal data object.
23       * @param data DoubleVectorData; the internal data object for the vector data
24       * @param displayUnit JerkUnit; the display unit of the vector data
25       */
26      public JerkVector(final DoubleVectorData data, final JerkUnit displayUnit)
27      {
28          super(data, displayUnit);
29      }
30  
31      /** {@inheritDoc} */
32      @Override
33      public Class<Jerk> getScalarClass()
34      {
35          return Jerk.class;
36      }
37  
38      /** {@inheritDoc} */
39      @Override
40      public JerkVector instantiateVector(final DoubleVectorData dvd, final JerkUnit displayUnit)
41      {
42          return new JerkVector(dvd, displayUnit);
43      }
44  
45      /** {@inheritDoc} */
46      @Override
47      public Jerk instantiateScalarSI(final double valueSI, final JerkUnit displayUnit)
48      {
49          Jerk result = Jerk.instantiateSI(valueSI);
50          result.setDisplayUnit(displayUnit);
51          return result;
52      }
53  
54  }