public class SimpleTrafficLight extends AbstractLaneBasedObject 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.
| Constructor and Description |
|---|
SimpleTrafficLight(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) |
| Modifier and Type | Method and Description |
|---|---|
SimpleTrafficLight |
clone(CrossSectionElement newCSE,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation)
Clone the LAneBasedObject for e.g., copying a network.
|
String |
getId()
Return the id of the traffic light.
|
TrafficLightColor |
getTrafficLightColor() |
void |
setTrafficLightColor(TrafficLightColor trafficLightColor)
Set the new traffic light color.
|
String |
toString() |
clone, getLane, getLongitudinalPositiongetBounds, 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, waitgetBounds, getLane, getLocation, getLongitudinalPosition, makeGeometrypublic SimpleTrafficLight(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) throws org.opentrafficsim.core.network.NetworkException
id - traffic light idlane - lane where the traffic light is locatedlongitudinalPosition - position of the traffic light on the lane, in the design directionsimulator - simulator on which to schedule color changesorg.opentrafficsim.core.network.NetworkException - 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.StaticObjectpublic String getId()
getId in interface TrafficLightpublic SimpleTrafficLight clone(CrossSectionElement newCSE, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone in class AbstractLaneBasedObjectnewCSE - the new cross section element to which the clone belongsnewSimulator - the new simulator for this networkanimation - whether to (re)create animation or notorg.opentrafficsim.core.network.NetworkException - in case the cloning failsCopyright © 2014–2016 Delft University of Technology. All rights reserved.