RoadMarkerAcross.java

  1. package org.opentrafficsim.road.network.lane;

  2. import java.io.Serializable;

  3. import org.djunits.value.vdouble.scalar.Length;

  4. /**
  5.  * <p>
  6.  * Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  7.  * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
  8.  * <p>
  9.  * $LastChangedDate: 2015-09-03 13:38:01 +0200 (Thu, 03 Sep 2015) $, @version $Revision: 1378 $, by $Author: averbraeck $,
  10.  * initial version Aug 21, 2014 <br>
  11.  * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  12.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  13.  */
  14. public abstract class RoadMarkerAcross implements Serializable
  15. {
  16.     /** */
  17.     private static final long serialVersionUID = 20141021L;

  18.     /** Cross section element for which this is a road marker. Usually this will be a Lane. */
  19.     private final CrossSectionElement crossSectionElement;

  20.     /** Longitudinal position on the cross section element. */
  21.     private final Length longitudinalPosition;

  22.     /**
  23.      * @param crossSectionElement CrossSectionElement; Cross section element for which this is a road marker. Usually this will
  24.      *            be a Lane.
  25.      * @param longitudinalPosition Length; Longitudinal position on the cross section element.
  26.      */
  27.     public RoadMarkerAcross(final CrossSectionElement crossSectionElement, final Length longitudinalPosition)
  28.     {
  29.         super();
  30.         this.crossSectionElement = crossSectionElement;
  31.         this.longitudinalPosition = longitudinalPosition;
  32.     }

  33.     /**
  34.      * @return crossSectionElement.
  35.      */
  36.     public final CrossSectionElement getCrossSectionElement()
  37.     {
  38.         return this.crossSectionElement;
  39.     }

  40.     /**
  41.      * @return longitudinalPosition.
  42.      */
  43.     public final Length getLongitudinalPosition()
  44.     {
  45.         return this.longitudinalPosition;
  46.     }

  47. }