protected void generateIndex() {
        for (int i = 0; i < groupList.size(); i++) {
        String groupname = (String)groupList.get(i);
        List list = (List)groupPackageMap.get(groupname);
            if (list != null && list.size() > 0) {
                printIndexContents((PackageDoc[])list.
                                       toArray(new PackageDoc[list.size()]),
                                    groupname);
            }
        }
    }