public String formatDecimal(final Number target, final Integer minIntegerDigits, final String thousandsPointType, final Integer decimalDigits, final String decimalPointType) {
final NumberPointType decimalNumberPointType = NumberPointType.match(decimalPointType);
if (decimalNumberPointType == null) {
throw new TemplateProcessingException(
"Unrecognized point format \"" + decimalPointType + "\"");
}
final NumberPointType thousandsNumberPointType = NumberPointType.match(thousandsPointType);
if (thousandsNumberPointType == null) {
throw new TemplateProcessingException(
"Unrecognized point format \"" + thousandsPointType + "\"");
}
try {