code: protected void adjustIndexMap(Iterable<? extends Element> elements) {
          for (Element element : elements) {
              if (shouldAddToIndexMap(element)) {
                  String name = utils.isPackage(element)
                          ? utils.getPackageName((PackageElement)element)
                          : utils.getSimpleName(element);
                  char ch = (name.length() == 0) ?
                            '*' :
                            Character.toUpperCase(name.charAt(0));
                  Character unicode = ch;
                  SortedSet<Element> list = indexmap.computeIfAbsent(unicode,
                          c -> new TreeSet<>(comparator));
                  list.add(element);
              }
          }
      }
docs: Adjust list of members according to their names. Check the first
  character in a member name, and then add the member to a list of members
  for that particular unicode character.
  
  @param elements Array of members.