A hashmap alternative to the “if then else” statement in Java
问题 Can anyone assist me with an alternative to if then else statements for control flow? Or advise on a good article? From what I've seen, some use mapping or enums. Trouble I'm having is that I have multiple conditions i.e. if (condition1 && condition2 && condition3)... and I need to do this for several permutations and all 3 variables need to be validated. Please can someone point me in the right direction? else if (String.Utils.isNotEmpty(payload.getKeyChange2TokenNumber()) && String.Utils