private void handler(Event e) { StateEvent ev = (StateEvent)e; switch (ev.type) { case StateEvent.TURN_ON: { turnOn(ev.next, ev.args); } break; case StateEvent.TURN_OFF: { turnOff(); } break; case StateEvent.CHANGE_STATE: { changeState(ev.next, ev.args); } break; } }
private void changeState(Event e) { StateEvent se = (StateEvent)e; }