public class SimpleTrafficLight extends AbstractTrafficLight
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.
DEFAULT_TRAFFICLIGHT_ELEVATIONlistenersTRAFFICLIGHT_CHANGE_EVENTFIRST_POSITION, LAST_POSITION| Constructor and Description |
|---|
SimpleTrafficLight(String id,
Lane lane,
Length longitudinalPosition,
DEVSSimulatorInterface.TimeDoubleUnit simulator) |
| Modifier and Type | Method and Description |
|---|---|
SimpleTrafficLight |
clone(CrossSectionElement newCSE,
SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the LaneBasedObject for e.g., copying a network.
|
String |
toString() |
getTrafficLightColor, setTrafficLightColorclone, getDirection, getFullId, getLane, getLocation, getLongitudinalPositiongetBounds, 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 SimpleTrafficLight(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 String toString()
toString in class AbstractLaneBasedObjectpublic SimpleTrafficLight clone(CrossSectionElement newCSE, SimulatorInterface.TimeDoubleUnit newSimulator) throws NetworkException
clone in class AbstractLaneBasedObjectnewCSE - CrossSectionElement; the new cross section element to which the clone belongsnewSimulator - SimulatorInterface.TimeDoubleUnit; the new simulator for this networkNetworkException - in case the cloning failsCopyright © 2014–2019 Delft University of Technology. All rights reserved.