code: public String toPattern(boolean escapeUnprintable) {
          StringBuilder result = new StringBuilder();
          result.append(matcher.toPattern(escapeUnprintable));
          if (minCount == 0) {
              if (maxCount == 1) {
                  return result.append('?').toString();
              } else if (maxCount == MAX) {
                  return result.append('*').toString();
              }
              // else fall through
          } else if (minCount == 1 && maxCount == MAX) {
              return result.append('+').toString();
          }
          result.append('{');
          result.append(Utility.hex(minCount,1));
          result.append(',');
          if (maxCount != MAX) {
              result.append(Utility.hex(maxCount,1));
          }
          result.append('}');
          return result.toString();
      }
docs: Implement UnicodeMatcher API