public class SimpleTrafficLight extends AbstractCSEObject implements TrafficLight
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
listenersFIRST_POSITION, LAST_POSITION| Constructor and Description |
|---|
SimpleTrafficLight(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length position,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) |
| Modifier and Type | Method and Description |
|---|---|
TrafficLightColor |
getTrafficLightColor() |
void |
setTrafficLightColor(TrafficLightColor trafficLightColor)
Set the new traffic light color.
|
String |
toString() |
createRectangleNextToCSE, createRectangleOnCSEgetBounds, getGeometry, getHeight, getLocationaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGeometry, getHeightgetBounds, getLocationaddListener, addListener, addListener, addListener, removeListenerpublic SimpleTrafficLight(String id, Lane lane, org.djunits.value.vdouble.scalar.Length position, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) throws org.opentrafficsim.core.geometry.OTSGeometryException
id - traffic light idlane - lane where the traffic light is locatedposition - position of the traffic light on the lane, in the design directionsimulator - simulator on which to schedule color changesorg.opentrafficsim.core.geometry.OTSGeometryException - on failure to place the objectpublic final TrafficLightColor getTrafficLightColor()
getTrafficLightColor in interface TrafficLightpublic final void setTrafficLightColor(TrafficLightColor trafficLightColor)
setTrafficLightColor in interface TrafficLighttrafficLightColor - set the trafficLightColorpublic String toString()
toString in class org.opentrafficsim.core.object.StaticObjectCopyright © 2014–2016 Delft University of Technology. All rights reserved.