code: public static String collapseQualifier(String qualifier, boolean includeDots) {
      StringTokenizer tokenizer = new StringTokenizer(qualifier, ".");
      String collapsed = Character.toString(tokenizer.nextToken().charAt(0));
      while (tokenizer.hasMoreTokens()) {
        if (includeDots) {
          collapsed += '.';
        }
        collapsed += tokenizer.nextToken().charAt(0);
      }
      return collapsed;
    }
docs: Given a qualifier, collapse it.
  
  @param qualifier   The qualifier to collapse.
  @param includeDots Should we include the dots in the collapsed form?
  @return The collapsed form.