Class LaneCombinationList


  • public class LaneCombinationList
    extends Object
    Contains lane combinations that should be treated differently.

    Copyright (c) 2013-2022 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 23 dec. 2016
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Detail

      • LaneCombinationList

        public LaneCombinationList()
    • Method Detail

      • addLinkCombination

        public final void addLinkCombination​(CrossSectionLink link1,
                                             CrossSectionLink link2)
        Add any combination of lanes on both links to the list. Order of the links does not matter.
        Parameters:
        link1 - CrossSectionLink; link 1
        link2 - CrossSectionLink; link 2
      • addLaneCombination

        public final void addLaneCombination​(Lane lane1,
                                             Lane lane2)
        Add lane combination to the list. Order of the lanes does not matter.
        Parameters:
        lane1 - Lane; lane 1
        lane2 - Lane; lane 2
      • contains

        public final boolean contains​(Lane lane1,
                                      Lane lane2)
        Returns whether the combination of the two lanes is included. Order of the lanes does not matter.
        Parameters:
        lane1 - Lane; lane 1
        lane2 - Lane; lane 2
        Returns:
        whether the combination of the two lanes is included