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