Interface RoadDefinitions

  • All Superinterfaces:
    Definitions
    All Known Subinterfaces:
    RoadNetwork
    All Known Implementing Classes:
    OTSRoadNetwork

    public interface RoadDefinitions
    extends Definitions
    The RoadDefinitions interface contains access to the core definitions that can be used to interpret the RoadNetwork and the RoadPerceivableContext. An example interface allows for the retrieval of LaneTypes.

    Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
    Author:
    Alexander Verbraeck
    • Method Detail

      • addDefaultLaneTypes

        void addDefaultLaneTypes()
        Add the default LaneTypes that have been defined in the enum LaneType.DEFAULTS to the network. It is not necessary to call this method on every network; when the LaneTypes are for instance defined in an XML file, adding the default types might not be needed.
      • addLaneType

        void addLaneType​(LaneType laneType)
        Add a Lane type to the map. This method is automatically called from the LaneType constructor.
        Parameters:
        laneType - the LaneType to add
      • getLaneType

        LaneType getLaneType​(String laneTypeId)
        Retrieve a defined LaneType based on its id.
        Parameters:
        laneTypeId - the id to search for
        Returns:
        the LaneType or null in case it could not be found
      • getLaneType

        LaneType getLaneType​(LaneType.DEFAULTS laneTypeEnum)
        Retrieve a defined default LaneType based on its enum.
        Parameters:
        laneTypeEnum - the enum to search for
        Returns:
        the LaneType or null in case it could not be found
      • getLaneTypes

        ImmutableMap<String,​LaneType> getLaneTypes()
        Retrieve a safe copy of the map of defined LaneTypes in this network.
        Returns:
        the map of defined LaneTypes