Package org.stringtemplate.v4
Class NumberRenderer
- java.lang.Object
-
- org.stringtemplate.v4.NumberRenderer
-
- All Implemented Interfaces:
AttributeRenderer<Object>
public class NumberRenderer extends Object implements AttributeRenderer<Object>
Works withByte,Short,Integer,Long, andBigIntegeras well asFloat,Double, andBigDecimal. You pass in a format string suitable forFormatter.format(java.lang.String, java.lang.Object...).For example,
%10demits a number as a decimal int padding to 10 char. This can even dolongtoDateconversions using the format string.
-
-
Constructor Summary
Constructors Constructor Description NumberRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString(Object value, String formatString, Locale locale)
-