Interface TrafficLight
-
- All Superinterfaces:
EventProducerInterface
,Identifiable
,LaneBasedObject
,Locatable
,ObjectInterface
,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.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Oct 6, 2016
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Field Summary
Fields Modifier and Type Field Description static TimedEventType
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
All Methods Instance Methods Abstract Methods 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.base.Identifiable
getId
-
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 Detail
-
TRAFFICLIGHT_CHANGE_EVENT
static final TimedEventType 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 Detail
-
getTrafficLightColor
TrafficLightColor getTrafficLightColor()
- Returns:
- the trafficLightColor
-
setTrafficLightColor
void setTrafficLightColor(TrafficLightColor trafficLightColor)
Set the new traffic light color.- Parameters:
trafficLightColor
- TrafficLightColor; set the trafficLightColor
-
-