// This list will be sorted by group name, since it is added to in order
List<GroupLeadershipInfo> sortedGroupLeadershipInfos = new ArrayList<GroupLeadershipInfo>();
for (String groupName : sortedGroupNames)
{
GroupLeadershipInfo groupLeadershipInfo = getGroupLeadershipInfo(baseZkPath,groupName);
sortedGroupLeadershipInfos.add(groupLeadershipInfo);
}
GroupsLeadershipInfo groupsLeadershipInfo = new GroupsLeadershipInfo(
Collections.unmodifiableList(sortedGroupNames),