code: public static String formatPercent(final Number target, final Integer minIntegerDigits,
          final Integer fractionDigits, final Locale locale) {
  
          Validate.notNull(fractionDigits, "Fraction digits cannot be null");
          Validate.notNull(locale, "Locale cannot be null");
  
          if (target == null) {
              return null;
          }
  
          NumberFormat format = NumberFormat.getPercentInstance(locale);
          format.setMinimumFractionDigits(fractionDigits.intValue());
          format.setMaximumFractionDigits(fractionDigits.intValue());
          if (minIntegerDigits != null) {
              format.setMinimumIntegerDigits(minIntegerDigits.intValue());
          }
  
          return format.format(target);
      }
docs: Formats a number as a percentage value.
  
  @param target           The number to format.
  @param minIntegerDigits Minimum number of digits to return (0 padding).
  @param fractionDigits   Minimum number of fraction digits to return (0
  padding).
  @param locale           Locale to use for formatting.
  @return The number formatted as a percentage, or {@code null} if the
  number given is {@code null}.