1 package org.opentrafficsim.road.network.lane.object.trafficlight;
2
3 import java.rmi.RemoteException;
4
5 import javax.naming.NamingException;
6
7 import org.djunits.value.vdouble.scalar.Length;
8 import org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface;
9 import org.opentrafficsim.core.dsol.OTSSimulatorInterface;
10 import org.opentrafficsim.core.network.NetworkException;
11 import org.opentrafficsim.road.network.lane.CrossSectionElement;
12 import org.opentrafficsim.road.network.lane.Lane;
13
14
15
16
17
18
19
20
21
22
23
24
25 public class SimpleTrafficLight extends AbstractTrafficLight
26 {
27
28 private static final long serialVersionUID = 201601001L;
29
30
31
32
33
34
35
36
37 public SimpleTrafficLight(final String id, final Lane lane, final Length longitudinalPosition,
38 final OTSDEVSSimulatorInterface simulator) throws NetworkException
39 {
40 super(id, lane, longitudinalPosition, simulator);
41
42 try
43 {
44 new TrafficLightAnimation(this, simulator);
45 }
46 catch (RemoteException | NamingException exception)
47 {
48 throw new NetworkException(exception);
49 }
50 }
51
52
53 @Override
54 @SuppressWarnings("checkstyle:designforextension")
55 public String toString()
56 {
57 return "SimpleTrafficLight [trafficLightColor=" + getTrafficLightColor() + "]";
58 }
59
60
61 @Override
62 @SuppressWarnings("checkstyle:designforextension")
63 public SimpleTrafficLight clone(final CrossSectionElement newCSE, final OTSSimulatorInterface newSimulator,
64 final boolean animation) throws NetworkException
65 {
66
67 return null;
68 }
69
70 }