public class CellElapsedFormatter extends CellFormatter
format, locale
Constructor and Description |
---|
CellElapsedFormatter(java.lang.String pattern)
Creates a elapsed time formatter.
|
Modifier and Type | Method and Description |
---|---|
void |
formatValue(java.lang.StringBuffer toAppendTo,
java.lang.Object value)
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 CellElapsedFormatter(java.lang.String pattern)
pattern
- The pattern to parse.public void formatValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)
CellFormatter
NOTE: this method must be thread safe! In particular, if it uses a Format instance that is not thread safe, i.e. DateFormat, this method must be synchronized, either on the method, if the format is a final property, or on the format instance itself.
formatValue
in class CellFormatter
toAppendTo
- The buffer to append to.value
- The value to format.public void simpleValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)
NOTE: this method must be thread safe! In particular, if it uses a Format instance that is not thread safe, i.e. DateFormat, this method must be synchronized, either on the method, if the format is a final property, or on the format instance itself.
For a date, this is "mm/d/y"
.
simpleValue
in class CellFormatter
toAppendTo
- The buffer to append to.value
- The value to format.Copyright 2022 The Apache Software Foundation or its licensors, as applicable.