How to break out of this if-else chain, since moving this logic to switch case looks difficult since, this code flow does some sort of prefix matching and does something based on if the condition is true.
if (fullPathWithPrefix.startsWith("A")) {
doA();
} else if (fullPathWithPrefix.startsWith("B")) {
doB();
} else if (fullPathWithPrefix.startsWith("C")) {
doC();
} else if (fullPathWithPrefix.startsWith("D")) {
doD();
} else if (fullPathWithPrefix.startsWith("E")) {
doE();
}