code: public void setPattern(String pattern) {
          if (pattern == null || pattern.length() <= 0) {
              throw new IllegalArgumentException(
                      "Pattern to search for can not be null or of length 0");
          }
          pattern_.text_ = pattern;
          initialize();
      }
docs: Set the pattern to search for.
  The iterator's position will not be changed by this method.
  @param pattern for searching
  @see #getPattern
  @exception IllegalArgumentException thrown if pattern is null or of
  length 0