public class HeadwayTrafficLight extends AbstractHeadwayLaneBasedObject
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.
Headway.ObjectType
Constructor and Description |
---|
HeadwayTrafficLight(TrafficLight trafficLight,
Length distance)
Construct a new Headway information object, for a traffic light ahead of us (or behind us, although that does not seem
very useful).
|
Modifier and Type | Method and Description |
---|---|
TrafficLightColor |
getTrafficLightColor() |
String |
toString() |
getLane
equals, getAcceleration, getId, getLength, getObjectType, getSpeed, hashCode
getDistance, getOverlap, getOverlapFront, getOverlapRear, isAhead, isBehind, isParallel
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getAcceleration, getDistance, getId, getLength, getObjectType, getOverlap, getOverlapFront, getOverlapRear, getSpeed, isAhead, isBehind, isParallel
public HeadwayTrafficLight(TrafficLight trafficLight, Length distance) throws GTUException
trafficLight
- TrafficLight; the traffic light object for further observation, can not be null.distance
- Length; the distance to the traffic light, distance cannot be null.GTUException
- when id is null, or parameters are inconsistentpublic final TrafficLightColor getTrafficLightColor()
public final String toString()
toString
in class AbstractHeadway
Copyright © 2014–2019 Delft University of Technology. All rights reserved.