Class CrossSection

  • All Implemented Interfaces:
    java.io.Serializable

    public class CrossSection
    extends java.lang.Object
    implements java.io.Serializable
    A cross sections contains locations on lanes that together make up a cross section. It is not required that this is on a single road, i.e. the cross section may any section in space.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version Sep 29, 2016
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    See Also:
    Serialized Form
    • Constructor Detail

      • CrossSection

        public CrossSection​(java.util.Set<KpiDirectedLanePosition> directedLanePositions)
        Constructor with set of directed lane positions.
        Parameters:
        directedLanePositions - Set<KpiDirectedLanePosition>; set of lane locations
    • Method Detail

      • size

        public final int size()
        Returns:
        number of directed lane positions
      • getDirectedLanePositions

        public final java.util.Set<KpiDirectedLanePosition> getDirectedLanePositions()
        Returns:
        safe copy of directed lane positions
      • getIterator

        public final java.util.Iterator<KpiDirectedLanePosition> getIterator()
        Returns:
        iterator over directed lane positions
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object