View Javadoc
1   package org.opentrafficsim.road.network.lane.conflict;
2   
3   /**
4    * Type of conflict. This regards how the conflict is spatially correlated to the other traffic.
5    * <p>
6    * Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
7    * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
8    * <p>
9    * @version $Revision$, $LastChangedDate$, by $Author$, initial version Jun 2, 2016 <br>
10   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
11   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
12   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
13   */
14  public enum ConflictType
15  {
16  
17      /** Crossing conflict. */
18      CROSSING,
19  
20      /** Merge conflict. */
21      MERGE,
22  
23      /** Split conflict. */
24      SPLIT;
25  
26      /**
27       * Returns whether this is a crossing.
28       * @return whether this is a crossing
29       */
30      public boolean isCrossing()
31      {
32          return this.equals(CROSSING);
33      }
34  
35      /**
36       * Returns whether this is a merge.
37       * @return whether this is a merge
38       */
39      public boolean isMerge()
40      {
41          return this.equals(MERGE);
42      }
43  
44      /**
45       * Returns whether this is a split.
46       * @return whether this is a split
47       */
48      public boolean isSplit()
49      {
50          return this.equals(SPLIT);
51      }
52  }