1 package org.opentrafficsim.road.network.lane.conflict; 2 3 /** 4 * Priority of conflict. This tells a GTU how to respond to the conflict. Whether a GTU has priority or not may come from any 5 * conflict rule. This only represents the resulting priority. 6 * <p> 7 * Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 8 * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>. 9 * <p> 10 * @version $Revision$, $LastChangedDate$, by $Author$, initial version Jun 2, 2016 <br> 11 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a> 12 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 13 * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a> 14 */ 15 public enum ConflictPriority 16 { 17 /** Have priority. */ 18 PRIORITY, 19 20 /** Give priority. */ 21 GIVE_WAY, 22 23 /** Stop and give priority. */ 24 STOP, 25 26 /** All-way stop. */ 27 ALL_STOP, 28 29 /** Split. */ 30 SPLIT; 31 32 /** 33 * Returns whether this is a priority conflict. 34 * @return whether this is a priority conflict 35 */ 36 public final boolean isPriority() 37 { 38 return this.equals(PRIORITY); 39 } 40 41 /** 42 * Returns whether this is a give-way conflict. 43 * @return whether this is a give-way conflict 44 */ 45 public final boolean isGiveWay() 46 { 47 return this.equals(GIVE_WAY); 48 } 49 50 /** 51 * Returns whether this is a stop conflict. 52 * @return whether this is a stop conflict 53 */ 54 public final boolean isStop() 55 { 56 return this.equals(STOP); 57 } 58 59 /** 60 * Returns whether this is an all-stop conflict. 61 * @return whether this is an all-stop conflict 62 */ 63 public final boolean isAllStop() 64 { 65 return this.equals(ALL_STOP); 66 } 67 68 /** 69 * Returns whether this is a stop conflict. 70 * @return whether this is a stop conflict 71 */ 72 public final boolean isSplit() 73 { 74 return this.equals(SPLIT); 75 } 76 77 }