code: public UnicodeSet getExemplarSet(int options, int extype) {
          String [] exemplarSetTypes = {
                  "ExemplarCharacters",
                  "AuxExemplarCharacters",
                  "ExemplarCharactersIndex",
                  "ExemplarCharactersCurrency",
                  "ExemplarCharactersPunctuation"
          };
  
          if (extype == ES_CURRENCY) {
              // currency symbol exemplar is no longer available
              return noSubstitute ? null : UnicodeSet.EMPTY;
          }
  
          try{
              final String aKey = exemplarSetTypes[extype]; // will throw an out-of-bounds exception
              ICUResourceBundle stringBundle = (ICUResourceBundle) bundle.get(aKey);
  
              if (noSubstitute && !bundle.isRoot() && stringBundle.isRoot()) {
                  return null;
              }
              String unicodeSetPattern = stringBundle.getString();
              return new UnicodeSet(unicodeSetPattern, UnicodeSet.IGNORE_SPACE | options);
          } catch (ArrayIndexOutOfBoundsException aiooe) {
              throw new IllegalArgumentException(aiooe);
          } catch (Exception ex){
              return noSubstitute ? null : UnicodeSet.EMPTY;
          }
      }
docs: Returns the set of exemplar characters for a locale.
  
  @param options   Bitmask for options to apply to the exemplar pattern.
  Specify zero to retrieve the exemplar set as it is
  defined in the locale data.  Specify
  UnicodeSet.CASE to retrieve a case-folded exemplar
  set.  See {@link UnicodeSet#applyPattern(String,
  int)} for a complete list of valid options.  The
  IGNORE_SPACE bit is always set, regardless of the
  value of 'options'.
  @param extype    The type of exemplar set to be retrieved,
  ES_STANDARD, ES_INDEX, ES_AUXILIARY, or ES_PUNCTUATION
  @return          The set of exemplar characters for the given locale.
  If there is nothing available for the locale,
  then null is returned if {@link #getNoSubstitute()} is true, otherwise the
  root value is returned (which may be UnicodeSet.EMPTY).
  @exception       RuntimeException if the extype is invalid.