Class LaneType

All Implemented Interfaces:
Serializable, Identifiable, Compatibility<GTUType,​LaneType>

public class LaneType
extends HierarchicalType<LaneType>
implements Serializable, Compatibility<GTUType,​LaneType>
Lane type to indicate compatibility with GTU types. The id of a LaneType should be unique. This is, however, not checked or enforced, as the LaneType is not a singleton as the result of the compatibilitySet. Different simulations running in the same GTU can have different compatibilitySets for LaneTypes with the same id. Therefore, uniqueness is not enforced.

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

$LastChangedDate: 2015-08-30 00:16:51 +0200 (Sun, 30 Aug 2015) $, @version $Revision: 1329 $, by $Author: averbraeck $, initial version Aug 21, 2014

Author:
Alexander Verbraeck, Peter Knoppers, Guus Tamminga
See Also:
Serialized Form
  • Constructor Details

    • LaneType

      public LaneType​(String id, GTUCompatibility<LaneType> compatibility, RoadNetwork network) throws NullPointerException
      Create a new Lane type with a compatibility set.
      Parameters:
      id - String; the id of the lane type.
      compatibility - GTUCompatibility<LaneType>; the collection of compatible GTUTypes for this LaneType. Compatibility is solely determined by a specific lane type, and independent of compatibility in super or sub types.
      network - RoadNetwork; The network to which the LaneType belongs
      Throws:
      NullPointerException - if either the id is null, or the compatibilitySet is null
    • LaneType

      public LaneType​(String id, LaneType parent, GTUCompatibility<LaneType> compatibility, RoadNetwork network) throws NullPointerException
      Create a new Lane type with a compatibility set.
      Parameters:
      id - String; the id of the lane type.
      parent - LaneType; parent type
      compatibility - GTUCompatibility<LaneType>; the collection of compatible GTUTypes for this LaneType. Compatibility is solely determined by a specific lane type, and independent of compatibility in super or sub types.
      network - RoadNetwork; The network to which the LaneType belongs
      Throws:
      NullPointerException - if either the id is null, or the compatibilitySet is null
  • Method Details