Class ExtendedCrossSectionLink

All Implemented Interfaces:
Serializable, Locatable, EventProducerInterface, Identifiable, Drawable, Link

public class ExtendedCrossSectionLink
extends CrossSectionLink
Augmented cross section link object.

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 15 may 2019
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Constructor Details

    • ExtendedCrossSectionLink

      public ExtendedCrossSectionLink​(RoadNetwork network, String id, OTSRoadNode startNode, OTSRoadNode endNode, LinkType linkType, OTSLine3D designLine, OTSSimulatorInterface simulator, LaneKeepingPolicy laneKeepingPolicy) throws NetworkException
      Construction of a cross section link with some extra data.
      Parameters:
      network - RoadNetwork; the network
      id - String; the link id.
      startNode - OTSRoadNode; the start node (directional).
      endNode - OTSRoadNode; the end node (directional).
      linkType - LinkType; the link type
      designLine - OTSLine3D; the design line of the Link
      simulator - OTSSimulatorInterface; the simulator on which events can be scheduled
      laneKeepingPolicy - LaneKeepingPolicy; the policy to generally keep left, keep right, or keep lane
      Throws:
      NetworkException - if link already exists in the network, if name of the link is not unique, or if the start node or the end node of the link are not registered in the network.
  • Method Details

    • addFeature

      public void addFeature​(String key, Feature feature)
      Add a feature.
      Parameters:
      key - String; identifies the database / shape file from which this feature was retrieved
      feature - Feature; the feature
    • getFeatures

      public Map<String,​Feature> getFeatures()
      Retrieve the feature map.
      Returns:
      List<Feature>; the feature map