View Javadoc
1   package org.opentrafficsim.road.gtu.strategical;
2   
3   import java.io.Serializable;
4   
5   import org.opentrafficsim.road.gtu.lane.LaneBasedGTU;
6   
7   import nl.tudelft.simulation.language.Throw;
8   
9   /**
10   * <p>
11   * Copyright (c) 2013-2018 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/docs/license.html">OpenTrafficSim License</a>.
13   * </p>
14   * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
15   * initial version Nov 26, 2015 <br>
16   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
17   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
18   */
19  public abstract class AbstractLaneBasedStrategicalPlanner implements LaneBasedStrategicalPlanner, Serializable
20  {
21      /** */
22      private static final long serialVersionUID = 20151126L;
23  
24      /** GTU. */
25      private final LaneBasedGTU gtu;
26  
27      /**
28       * @param gtu GTU
29       */
30      public AbstractLaneBasedStrategicalPlanner(final LaneBasedGTU gtu)
31      {
32          Throw.whenNull(gtu, "GTU may not be null.");
33          this.gtu = gtu;
34      }
35  
36      /** {@inheritDoc} */
37      @Override
38      public final LaneBasedGTU getGtu()
39      {
40          return this.gtu;
41      }
42  
43  }