code: public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) {
          if (msgPattern == null) {
              msgPattern = new MessagePattern(aposMode);
          } else if (aposMode != msgPattern.getApostropheMode()) {
              msgPattern.clearPatternAndSetApostropheMode(aposMode);
          }
          applyPattern(pattern);
      }
docs: <strong>[icu]</strong> Sets the ApostropheMode and the pattern used by this message format.
  Parses the pattern and caches Format objects for simple argument types.
  Patterns and their interpretation are specified in the
  <a href="#patterns">class description</a>.
  <p>
  This method is best used only once on a given object to avoid confusion about the mode,
  and after constructing the object with an empty pattern string to minimize overhead.
  
  @param pattern the pattern for this message format
  @param aposMode the new ApostropheMode
  @throws IllegalArgumentException if the pattern is invalid
  @see MessagePattern.ApostropheMode