How do I perform a Boolean To Enum refactor in IntelliJ IDEA?
For example, convert this:
void changeLights(boolean isOn) {
this.isOn = isOn;
}
changeLights(true);
changeLights(false);
Into this:
enum LightState { ON, OFF }
void changeLights(LightState lightState) {
this.lightState = lightState;
}
changeLights(LightState.ON);
changeLights(LightState.OFF);