org.apache.poi.ss.format
Class CellFormatter
- java.lang.Object
-
- org.apache.poi.ss.format.CellFormatter
-
- Direct Known Subclasses:
- CellDateFormatter, CellElapsedFormatter, CellGeneralFormatter, CellNumberFormatter, CellTextFormatter
public abstract class CellFormatter extends java.lang.ObjectThis is the abstract supertype for the various cell formatters.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.util.LocaleLOCALEThis is the locale used to get a consistent format result from which to work.
-
Constructor Summary
Constructors Constructor and Description CellFormatter(java.lang.String format)Creates a new formatter object, storing the format informat.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description java.lang.Stringformat(java.lang.Object value)Formats the value, returning the resulting string.abstract voidformatValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)Format a value according the format string.java.lang.StringsimpleFormat(java.lang.Object value)Formats the value in the most basic way, returning the resulting string.abstract voidsimpleValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)Format a value according to the type, in the most basic way.
-
-
-
Field Detail
-
LOCALE
public static final java.util.Locale LOCALE
This is the locale used to get a consistent format result from which to work.
-
-
Constructor Detail
-
CellFormatter
public CellFormatter(java.lang.String format)
Creates a new formatter object, storing the format informat.- Parameters:
format- The format.
-
-
Method Detail
-
formatValue
public abstract void formatValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)Format a value according the format string.- Parameters:
toAppendTo- The buffer to append to.value- The value to format.
-
simpleValue
public abstract void simpleValue(java.lang.StringBuffer toAppendTo, java.lang.Object value)Format a value according to the type, in the most basic way.- Parameters:
toAppendTo- The buffer to append to.value- The value to format.
-
format
public java.lang.String format(java.lang.Object value)
Formats the value, returning the resulting string.- Parameters:
value- The value to format.- Returns:
- The value, formatted.
-
simpleFormat
public java.lang.String simpleFormat(java.lang.Object value)
Formats the value in the most basic way, returning the resulting string.- Parameters:
value- The value to format.- Returns:
- The value, formatted.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG