- int indexOfDot = stateID.indexOf('.');
- if (indexOfDot != -1)
- switch (stateID.substring(0, indexOfDot))
- {
- case "c00":
- cell00.setHighLevelState(stateID.substring(indexOfDot + 1), newState);
- break;
- case "c01":
- cell01.setHighLevelState(stateID.substring(indexOfDot + 1), newState);
- break;
- case "c10":
- cell10.setHighLevelState(stateID.substring(indexOfDot + 1), newState);
- break;
- case "c11":
- cell11.setHighLevelState(stateID.substring(indexOfDot + 1), newState);
- break;
- default:
- super.setHighLevelState(stateID, newState);
- break;
- }
- else
- super.setHighLevelState(stateID, newState);
+ // should not happen because we tell SubmodelComponent to only allow these state IDs.
+ throw new IllegalStateException("Illegal atomic state ID: " + stateID);