View Javadoc
1   package org.opentrafficsim.core.units.distributions;
2   
3   import org.djunits.unit.SpeedUnit;
4   import org.djunits.value.vdouble.scalar.Speed;
5   
6   import nl.tudelft.simulation.jstats.distributions.DistContinuous;
7   
8   /**
9    * Continuously distributed speed.
10   * <p>
11   * Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12   * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
13   * <p>
14   * @version $Revision$, $LastChangedDate$, by $Author$, initial version 29 aug. 2018 <br>
15   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
16   */
17  // This class was automatically generated
18  public class ContinuousDistSpeed extends ContinuousDistDoubleScalar.Rel<Speed, SpeedUnit>
19  {
20  
21      /** */
22      private static final long serialVersionUID = 20180829L;
23  
24      /**
25       * @param distribution DistContinuous; distribution
26       * @param unit SpeedUnit; units
27       */
28      public ContinuousDistSpeed(final DistContinuous distribution, final SpeedUnit unit)
29      {
30          super(distribution, unit);
31  
32      }
33  
34      /** {@inheritDoc} */
35      @Override
36      public Speed draw()
37      {
38          return new Speed(getDistribution().draw(), (SpeedUnit) getUnit());
39      }
40  
41      /** {@inheritDoc} */
42      @Override
43      public final String toString()
44      {
45          return "ContinuousDistSpeed []";
46      }
47  
48  }