package org.opentrafficsim.road.gtu.lane.tactical; /** * Interface for tactical planners to return the control state for visualization. *

* 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 May 1, 2019
* @author Alexander Verbraeck * @author Peter Knoppers * @author Wouter Schakel */ public interface Controllable { /** * Returns the control state. * @return State; control state */ State getControlState(); /** * Control state. *

* 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 May 1, 2019
* @author Alexander Verbraeck * @author Peter Knoppers * @author Wouter Schakel */ enum State { /** GTU has no control. */ NONE, /** Control is disabled. */ DISABLED, /** Control is enabled. */ ENABLED; /** * Returns whether this is NONE. * @return boolean; whether this is NONE */ public boolean isNone() { return this.equals(NONE); } /** * Returns whether this is DISABLED. * @return boolean; whether this is DISABLED */ public boolean isDisabled() { return this.equals(DISABLED); } /** * Returns whether this is ENABLED. * @return boolean; whether this is ENABLED */ public boolean isEnabled() { return this.equals(ENABLED); } } }