class TestFormat { public void test(boolean isA, boolean isB, boolean isC) { if (isA) // doSomethingElse(1) doSomething(1); else if (isB) // doSomethingElse(2) doSomething(2); else if (isC) // doSomethingElse(3) doSomething(3); } }