TurnIndicatorIntent.java

  1. package org.opentrafficsim.core.gtu;

  2. /**
  3.  * Intent for turn indicator.
  4.  * <p>
  5.  * Copyright (c) 2013-2020 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/license.html">OpenTrafficSim License</a>.
  7.  * </p>
  8.  * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
  9.  * initial version Mar 1, 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.  */
  13. public enum TurnIndicatorIntent
  14. {

  15.     /** None. */
  16.     NONE,

  17.     /** Left. */
  18.     LEFT,

  19.     /** Right. */
  20.     RIGHT,

  21.     /** Conflicting intents. */
  22.     CONFLICTING;

  23.     /**
  24.      * @return whether no indicator intent
  25.      */
  26.     public boolean isNone()
  27.     {
  28.         return this.equals(NONE);
  29.     }

  30.     /**
  31.      * @return whether left turn indicator intent
  32.      */
  33.     public boolean isLeft()
  34.     {
  35.         return this.equals(LEFT);
  36.     }

  37.     /**
  38.      * @return whether right turn indicator intent
  39.      */
  40.     public boolean isRight()
  41.     {
  42.         return this.equals(RIGHT);
  43.     }

  44.     /**
  45.      * @return whether conflicting indicator intent
  46.      */
  47.     public boolean isConflicting()
  48.     {
  49.         return this.equals(CONFLICTING);
  50.     }

  51. }