I need to change the following if\'s to a switch-case while checking for a String, to improve the cyclomatic complexity.<
if
switch
case
String
String value = someMethod(); switch(0) { default: if ("apple".equals(value)) { method1(); break; } if ("carrot".equals(value)) { method2(); break; } if ("mango".equals(value)) { method3(); break; } if ("orance".equals(value)) { method4(); break; } }