#refactoring

How to avoid conditionals in your code

Use a Map instead of if/else to handle finite conditions in Java.

How to avoid conditionals in your code