code: @Override
      public String toPattern(boolean escapeUnprintable) {
          StringBuffer result = new StringBuffer();
          StringBuffer quoteBuf = new StringBuffer();
          if (segmentNumber > 0) { // i.e., if this is a segment
              result.append('(');
          }
          for (int i=0; i<pattern.length(); ++i) {
              char keyChar = pattern.charAt(i); // OK; see note (1) above
              UnicodeMatcher m = data.lookupMatcher(keyChar);
              if (m == null) {
                  Utility.appendToRule(result, keyChar, false, escapeUnprintable, quoteBuf);
              } else {
                  Utility.appendToRule(result, m.toPattern(escapeUnprintable),
                                       true, escapeUnprintable, quoteBuf);
              }
          }
          if (segmentNumber > 0) { // i.e., if this is a segment
              result.append(')');
          }
          // Flush quoteBuf out to result
          Utility.appendToRule(result, -1,
                               true, escapeUnprintable, quoteBuf);
          return result.toString();
      }
docs: Implement UnicodeMatcher