MyState (MyAction action) { if (MyAction.finish.equals(action)) { return empty; } else if (MyAction.request.equals(action)) { return MyState.inProgressRequestSubmitted; } logWrongAction(this, action); return this; }