I understand that the first argument will be a named constant, and it distinguishes between different cases
new MyClass(CASE_ONE, p1);
You can use factory methods
public static MyClass createCaseOne(int p1){ ... } public static MyClass createCaseTwo(int p1, int p2){ ... } public static MyClass createCaseThree(int p1, int p2, int p3){ ... } ...
source share