code: private String[] getEquivalents(String segment) {
          Set<String> result = new HashSet<String>();
          Set<String> basic = getEquivalents2(segment);
          Set<String> permutations = new HashSet<String>();
  
          // now get all the permutations
          // add only the ones that are canonically equivalent
          // TODO: optimize by not permuting any class zero.
          Iterator<String> it = basic.iterator();
          while (it.hasNext()) {
              String item = it.next();
              permutations.clear();
              permute(item, SKIP_ZEROS, permutations);
              Iterator<String> it2 = permutations.iterator();
              while (it2.hasNext()) {
                  String possible = it2.next();
  
  /*
                  String attempt = Normalizer.normalize(possible, Normalizer.DECOMP, 0);
                  if (attempt.equals(segment)) {
  */
                  if (Normalizer.compare(possible, segment,0)==0) {
  
                      if (PROGRESS) System.out.println("Adding Permutation: " + Utility.hex(possible));
                      result.add(possible);
  
                  } else {
                      if (PROGRESS) System.out.println("-Skipping Permutation: " + Utility.hex(possible));
                  }
              }
          }
  
          // convert into a String[] to clean up storage
          String[] finalResult = new String[result.size()];
          result.toArray(finalResult);
          return finalResult;
      }
docs: we have a segment, in NFD. Find all the strings that are canonically equivalent to it.