I'm trying to handle combinatoric user input with switch cases to process, and it seemed to be going well until the final switch
System.out.println("\t output switch = " + state.get(2));
switch(state.get(2)){
//Case MCNP
case 0:
{
abundances = verifyAndNorm(abundances, new MCNPVerifier(MCNP));
out = toMCNP(mat, abundances);
System.out.println("\t MCNP");
}
//Case SCALE
case 1:
{
abundances = verifyAndNorm(abundances, new SCALEVerifier(SCALE));
out = toSCALE(mat, abundances, weightFracFlag);
System.out.println("\t SCALE");
}
}
Prints out
output switch = 0
MCNP
SCALE
And the result is that out = toScale(...), and since it is printing both MCNP and SCALE, it must be hitting both cases, but it's only true for one...
What am I missing here?