ConflictType.java

  1. package org.opentrafficsim.road.network.lane.conflict;

  2. /**
  3.  * Type of conflict. This regards how the conflict is spatially correlated to the other traffic.
  4.  * <p>
  5.  * Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  6.  * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
  7.  * <p>
  8.  * @version $Revision$, $LastChangedDate$, by $Author$, initial version Jun 2, 2016 <br>
  9.  * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  10.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  11.  * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
  12.  */
  13. public enum ConflictType
  14. {

  15.     /** Crossing conflict. */
  16.     CROSSING,

  17.     /** Merge conflict. */
  18.     MERGE,

  19.     /** Split conflict. */
  20.     SPLIT;

  21.     /**
  22.      * Returns whether this is a crossing.
  23.      * @return whether this is a crossing
  24.      */
  25.     public boolean isCrossing()
  26.     {
  27.         return this.equals(CROSSING);
  28.     }

  29.     /**
  30.      * Returns whether this is a merge.
  31.      * @return whether this is a merge
  32.      */
  33.     public boolean isMerge()
  34.     {
  35.         return this.equals(MERGE);
  36.     }

  37.     /**
  38.      * Returns whether this is a split.
  39.      * @return whether this is a split
  40.      */
  41.     public boolean isSplit()
  42.     {
  43.         return this.equals(SPLIT);
  44.     }
  45. }