code: private NumberFormat parseFormatter(Context context, Arguments args)
      {
          final String format = args.get(FORMAT_PARAM_NAME);
          final Locale locale = context.get(LOCALE);
          if (format != null)
          {
              return new DecimalFormat(format, DecimalFormatSymbols.getInstance(locale));
          }
  
          final Mode mode = Mode.loadFromContext(args, this.defaultMode);
          if (Mode.INTEGER.equals(mode))
          {
              return NumberFormat.getIntegerInstance(locale);
          }
          if (Mode.CURRENCY.equals(mode))
          {
              return NumberFormat.getCurrencyInstance(locale);
          }
          if (Mode.PERCENT.equals(mode))
          {
              return NumberFormat.getPercentInstance(locale);
          }
          return NumberFormat.getInstance(locale);
      }
docs: Parses the {@link NumberFormat} to use from the context arguments.
  
  @param context The context.
  @param args The arguments of the macro.
  
  @return the {@link NumberFormat}.