正确案例:
1.多条件下可以通过case 7: case 3: 执行条件或|,简而言之就是
if (type ==7 || type == 3){
…
}
case 0:final String v1 = row.get(field).toString();row.put(field, v1);break;case 1:final Float v2 = Float.parseFloat(row.get(field).toString());row.put(field, v2);break;case 7:case 3:final Long v3 = Long.parseLong(row.get(field).toString());row.put(field, v3);break;case 11:case 10:case 6:case 2:final Integer v4 = Integer.parseInt(row.get(field).toString());row.put(field, v4);break;
2.错误案例: switch case 不支持 | 的方式执行!!!闭坑!!!,最终执行判定的时候导致所有都执行不成功!也没有报错提醒!!
case 2|7:final Integer v4 = Integer.parseInt(row.get(field).toString());row.put(field, v4);break;