Interface TrafficLight
- All Superinterfaces:
EventProducerInterface
,Identifiable
,LaneBasedObject
,Locatable
,ObjectInterface
,java.io.Serializable
- All Known Implementing Classes:
AbstractTrafficLight
,SimpleTrafficLight
public interface TrafficLight extends Locatable, LaneBasedObject
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
Fields Modifier and Type Field Description static EventType
TRAFFICLIGHT_CHANGE_EVENT
The timed event type for pub/sub indicating the change of color of a traffic light.Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
Method Summary
Modifier and Type Method Description TrafficLightColor
getTrafficLightColor()
void
setTrafficLightColor(TrafficLightColor trafficLightColor)
Set the new traffic light color.Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, getSourceId, hasListeners, numberOfListeners, removeListener
Methods inherited from interface org.opentrafficsim.road.network.lane.object.LaneBasedObject
getBounds, getDirection, getLane, getLocation, getLongitudinalPosition
Methods inherited from interface org.opentrafficsim.core.object.ObjectInterface
getFullId, getGeometry, getHeight
-
Field Details
-
TRAFFICLIGHT_CHANGE_EVENT
The timed event type for pub/sub indicating the change of color of a traffic light.
Payload: Object[] {String trafficLightId, TrafficLight trafficLight, TrafficLightColor newColor}
-
-
Method Details
-
getTrafficLightColor
TrafficLightColor getTrafficLightColor()- Returns:
- the trafficLightColor
-
setTrafficLightColor
Set the new traffic light color.- Parameters:
trafficLightColor
- TrafficLightColor; set the trafficLightColor
-