{
if (groupMap == null)
groupMap = new HashMap<String, StateGroupDefinition>();
StateDefinition state = stateMap.get(stateName);
StateGroupDefinition group = groupMap.get(groupName);
if (group == null)
{
group = new StateGroupDefinition(groupName, getDefinition());
groupMap.put(groupName, group);
}
state.addGroup(group);
group.addState(state);
}