Interface TrafficLight
- All Superinterfaces:
 nl.tudelft.simulation.event.EventProducerInterface,Identifiable,LaneBasedObject,Locatable,ObjectInterface
- 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 nl.tudelft.simulation.event.EventTypeTRAFFICLIGHT_CHANGE_EVENTThe timed event type for pub/sub indicating the change of color of a traffic light. - 
Method Summary
Modifier and Type Method Description TrafficLightColorgetTrafficLightColor()voidsetTrafficLightColor(TrafficLightColor trafficLightColor)Set the new traffic light color.Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
addListener, addListener, addListener, addListener, removeListenerMethods inherited from interface org.opentrafficsim.road.network.lane.object.LaneBasedObject
getBounds, getDirection, getLane, getLocation, getLongitudinalPositionMethods inherited from interface org.opentrafficsim.core.object.ObjectInterface
getFullId, getGeometry, getHeight 
- 
Field Details
- 
TRAFFICLIGHT_CHANGE_EVENT
static final nl.tudelft.simulation.event.EventType TRAFFICLIGHT_CHANGE_EVENTThe 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
 
 -