code: private NumberFormat createParser(Locale loc) throws JspException {
          NumberFormat parser = null;
  
          if ((type == null) || NUMBER.equalsIgnoreCase(type)) {
              parser = NumberFormat.getNumberInstance(loc);
          } else if (CURRENCY.equalsIgnoreCase(type)) {
              parser = NumberFormat.getCurrencyInstance(loc);
          } else if (PERCENT.equalsIgnoreCase(type)) {
              parser = NumberFormat.getPercentInstance(loc);
          } else {
              throw new JspException(
                      Resources.getMessage("PARSE_NUMBER_INVALID_TYPE",
                              type));
          }
  
          return parser;
      }
docs: Private utility methods