public void addState ( TrafficLightState state ) { if ( this . states == null ) this . states = new ArrayList < TrafficLightState > ( ) ; this . states . add ( state ) ; }
Adds a state to the traffic light .