code: private void addTypeElement(TypeElement typeElement, Map<PackageElement, SortedSet<TypeElement>> map) {
  
          PackageElement pkg = utils.containingPackage(typeElement);
          if (utils.isSpecified(pkg) || configuration.nodeprecated && utils.isDeprecated(pkg)) {
              // No need to catalog this class if it's package is
              // specified on the command line or if -nodeprecated option is set
              return;
          }
  
          SortedSet<TypeElement> s = map.get(pkg);
          if (s == null) {
              packageSet.add(pkg);
              s = new TreeSet<>(comparator);
          }
          s.add(typeElement);
          map.put(pkg, s);
  
      }
docs: Add the given class to the given map.
  
  @param typeElement the class to add to the catalog.
  @param map the Map to add the TypeElement to.