code: public void applyPattern(String pattern) {
          this.pattern = pattern;
          if (msgPattern == null) {
              msgPattern = new MessagePattern();
          }
          try {
              msgPattern.parseSelectStyle(pattern);
          } catch(RuntimeException e) {
              reset();
              throw e;
          }
      }
docs: Sets the pattern used by this select format.
  Patterns and their interpretation are specified in the class description.
  
  @param pattern the pattern for this select format.
  @throws IllegalArgumentException when the pattern is not a valid select format pattern.