code: protected static String getPattern(ULocale forLocale, int choice) {
          /* for ISOCURRENCYSTYLE and PLURALCURRENCYSTYLE,
           * the pattern is the same as the pattern of CURRENCYSTYLE
           * but by replacing the single currency sign with
           * double currency sign or triple currency sign.
           */
          String patternKey = null;
          switch (choice) {
          case NUMBERSTYLE:
          case INTEGERSTYLE:
              patternKey = "decimalFormat";
              break;
          case CURRENCYSTYLE:
              String cfKeyValue = forLocale.getKeywordValue("cf");
              patternKey = (cfKeyValue != null && cfKeyValue.equals("account")) ?
                      "accountingFormat" : "currencyFormat";
              break;
          case CASHCURRENCYSTYLE:
          case ISOCURRENCYSTYLE:
          case PLURALCURRENCYSTYLE:
          case STANDARDCURRENCYSTYLE:
              patternKey = "currencyFormat";
              break;
          case PERCENTSTYLE:
              patternKey = "percentFormat";
              break;
          case SCIENTIFICSTYLE:
              patternKey = "scientificFormat";
              break;
          case ACCOUNTINGCURRENCYSTYLE:
              patternKey = "accountingFormat";
              break;
          default:
              assert false;
              patternKey = "decimalFormat";
              break;
          }
  
          ICUResourceBundle rb = (ICUResourceBundle)UResourceBundle.
          getBundleInstance(ICUData.ICU_BASE_NAME, forLocale);
          NumberingSystem ns = NumberingSystem.getInstance(forLocale);
  
          String result = rb.findStringWithFallback(
                      "NumberElements/" + ns.getName() + "/patterns/" + patternKey);
          if (result == null) {
              result = rb.getStringWithFallback("NumberElements/latn/patterns/" + patternKey);
          }
  
          return result;
      }
docs: Returns the pattern for the provided locale and choice.
  @param forLocale the locale of the data.
  @param choice the pattern format.
  @return the pattern