Refactor switch to EnumJAVING·Follow1 min read·Jun 15, 2020--ListenShareDo switch statements sound good to you? Trust me better switch to Enum before it destroys your ears ;)If you survived that, have please look at this comment on how to use “Replace Type Code with Class/Enum” refactoring technique.