code: private boolean hasPrintedPackageIndex(String pkgname) {
          String[] list = printedPackageHeaders.toArray(new String[] {});
          for (String packageHeader : list) {
              if (pkgname.startsWith(packageHeader)) {
                  return true;
              }
          }
          return false;
      }
docs: Return true if the given package name has been printed.  Also
  return true if the root of this package has been printed.
  
  @param pkgname the name of the package to check.