View Javadoc
1   package org.opentrafficsim.road.network.lane;
2   
3   import java.io.Serializable;
4   
5   import org.djunits.value.vdouble.scalar.Length;
6   
7   /**
8    * <p>
9    * Copyright (c) 2013-2024 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://github.com/averbraeck">Alexander Verbraeck</a>
13   * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
14   */
15  public abstract class RoadMarkerAcross implements Serializable
16  {
17      /** */
18      private static final long serialVersionUID = 20141021L;
19  
20      /** Cross section element for which this is a road marker. Usually this will be a Lane. */
21      private final CrossSectionElement crossSectionElement;
22  
23      /** Longitudinal position on the cross section element. */
24      private final Length longitudinalPosition;
25  
26      /**
27       * @param crossSectionElement Cross section element for which this is a road marker. Usually this will be a Lane.
28       * @param longitudinalPosition Longitudinal position on the cross section element.
29       */
30      public RoadMarkerAcross(final CrossSectionElement crossSectionElement, final Length longitudinalPosition)
31      {
32          this.crossSectionElement = crossSectionElement;
33          this.longitudinalPosition = longitudinalPosition;
34      }
35  
36      /**
37       * @return crossSectionElement.
38       */
39      public final CrossSectionElement getCrossSectionElement()
40      {
41          return this.crossSectionElement;
42      }
43  
44      /**
45       * @return longitudinalPosition.
46       */
47      public final Length getLongitudinalPosition()
48      {
49          return this.longitudinalPosition;
50      }
51  
52  }