public class CellNumberFormatter extends CellFormatter
format, locale
Constructor and Description |
---|
CellNumberFormatter(java.util.Locale locale,
java.lang.String format)
Creates a new cell number formatter.
|
CellNumberFormatter(java.lang.String format)
Creates a new cell number formatter.
|
Modifier and Type | Method and Description |
---|---|
void |
formatValue(java.lang.StringBuffer toAppendTo,
java.lang.Object valueObject)
Format a value according the format string.
|
void |
simpleValue(java.lang.StringBuffer toAppendTo,
java.lang.Object value)
Format a value according to the type, in the most basic way.
|
format, simpleFormat
public CellNumberFormatter(java.lang.String format)
format
- The format to parse.public CellNumberFormatter(java.util.Locale locale, java.lang.String format)
locale
- The locale to use.format
- The format to parse.public void formatValue(java.lang.StringBuffer toAppendTo, java.lang.Object valueObject)
formatValue
in class CellFormatter
toAppendTo
- The buffer to append to.valueObject
- The value to format.public void simpleValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)
For a number, this is "#" for integer values, and "#.#" for floating-point values.
simpleValue
in class CellFormatter
toAppendTo
- The buffer to append to.value
- The value to format.Copyright 2018 The Apache Software Foundation or its licensors, as applicable.