public abstract class AbstractTrafficLight extends AbstractLaneBasedObject implements TrafficLight
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
static Length |
DEFAULT_TRAFFICLIGHT_ELEVATION
Default elevation of a traffic light (above zero; don't use this for lanes at non-zero elevation).
|
listenersTRAFFICLIGHT_CHANGE_EVENTFIRST_POSITION, LAST_POSITION| Constructor and Description |
|---|
AbstractTrafficLight(String id,
Lane lane,
Length longitudinalPosition,
DEVSSimulatorInterface.TimeDoubleUnit simulator)
Construct an AbstractTrafficLight at default elevation (use only on roads at elevation 0).
|
AbstractTrafficLight(String id,
Lane lane,
Length longitudinalPosition,
DEVSSimulatorInterface.TimeDoubleUnit simulator,
Length height)
Construct an AbstractTrafficLight with specified elevation.
|
| Modifier and Type | Method and Description |
|---|---|
TrafficLightColor |
getTrafficLightColor() |
void |
setTrafficLightColor(TrafficLightColor trafficLightColor)
Set the new traffic light color.
|
clone, clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPosition, toStringgetBounds, getGeometry, getHeight, getIdaddListener, 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, getDirection, getLane, getLocation, getLongitudinalPosition, makeGeometrygetFullId, getGeometry, getHeightgetIdaddListener, addListener, addListener, addListener, removeListenerpublic static final Length DEFAULT_TRAFFICLIGHT_ELEVATION
public AbstractTrafficLight(String id, Lane lane, Length longitudinalPosition, DEVSSimulatorInterface.TimeDoubleUnit simulator, Length height) throws NetworkException
id - String; traffic light idlane - Lane; lane where the traffic light is locatedlongitudinalPosition - Length; position of the traffic light on the lane, in the design directionsimulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator for animation and timed eventsheight - Length; the elevation of the traffic lightNetworkException - on failure to place the objectpublic AbstractTrafficLight(String id, Lane lane, Length longitudinalPosition, DEVSSimulatorInterface.TimeDoubleUnit simulator) throws NetworkException
id - String; traffic light idlane - Lane; lane where the traffic light is locatedlongitudinalPosition - Length; position of the traffic light on the lane, in the design directionsimulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator for animation and timed eventsNetworkException - on failure to place the objectpublic final TrafficLightColor getTrafficLightColor()
getTrafficLightColor in interface TrafficLightpublic final void setTrafficLightColor(TrafficLightColor trafficLightColor)
setTrafficLightColor in interface TrafficLighttrafficLightColor - TrafficLightColor; set the trafficLightColorCopyright © 2014–2019 Delft University of Technology. All rights reserved.