public IGroup muteToGroup(Code code, String namespace, GroupType type, IGroup parent) { final ILeaf leaf = getLeafs().get(code); ((EntityImpl) leaf).muteToGroup(namespace, type, parent); final IGroup result = (IGroup) leaf; removeLeaf(code); return result; }