<分区>
我正在尝试处理带有要处理的切换案例的组合用户输入,在最终切换之前它似乎进展顺利
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");
}
}
打印出来
output switch = 0
MCNP
SCALE
结果是 out = toScale(...),并且由于它同时打印 MCNP 和 SCALE,所以它必须同时满足这两种情况,但它只适用于一种情况...
我在这里错过了什么?