code: public Set<String> allVariants(boolean compressWhitespace) {
          if (!compressWhitespace) {
              return new HashSet<>(variants);
          }
          Set<String> compressed = new HashSet<>();
          for (String variant : variants) {
              compressed.add(variant.replaceAll("\\s{2,}", " "));
          }
          return compressed;
      }
docs: <p>
  Returns a new copy set of all variants. Any two or more consecutive white
  space characters will be condensed into a single space if boolean flag is
  set.
  </p>
  <p>
  Otherwise, any whitespace will be left as is.
  </p>
  
  @param compressWhitespace whether or not to compress whitespace
  @return a {@link Set} of all variants