public void removeState(int stateId) { states.remove(stateId); for (State s : states.values()) { s.removeTransition(stateId); } }