Class FormatSpecification
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.filter.FormatSpecification
-
public class FormatSpecification extends Object
The FormatSpecification classifies a format string into the 4 known classes of format-strings of Java. This is used by the Excel-export to transform the raw-formatstring into a suitable cell-format. This class is plain value-carrier. It is mutable and should not be used outside the scope of querying raw-datasources.- Author:
- : Thomas Morgner
-
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_CHOICE_FORMAT
A constant declaring that the format-type is a choice-format.static int
TYPE_DATE_FORMAT
A constant declaring that the format-type is a simple date-format.static int
TYPE_DECIMAL_FORMAT
A constant declaring that the format-type is a decimal-format.static int
TYPE_MESSAGE_FORMAT
A constant declaring that the format-type is a message-format.static int
TYPE_UNDEFINED
A constant declaring that the format-type cannot be determined in a reliable way.
-
Constructor Summary
Constructors Constructor Description FormatSpecification()
Creates an empty object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFormatString()
Returns the raw-format-string.int
getType()
Returns the type of the format string contained in this class.void
redefine(int type, String formatString)
Redefines the values stored in this specification object.
-
-
-
Field Detail
-
TYPE_UNDEFINED
public static final int TYPE_UNDEFINED
A constant declaring that the format-type cannot be determined in a reliable way.- See Also:
- Constant Field Values
-
TYPE_DATE_FORMAT
public static final int TYPE_DATE_FORMAT
A constant declaring that the format-type is a simple date-format.- See Also:
- Constant Field Values
-
TYPE_DECIMAL_FORMAT
public static final int TYPE_DECIMAL_FORMAT
A constant declaring that the format-type is a decimal-format.- See Also:
- Constant Field Values
-
TYPE_MESSAGE_FORMAT
public static final int TYPE_MESSAGE_FORMAT
A constant declaring that the format-type is a message-format.- See Also:
- Constant Field Values
-
TYPE_CHOICE_FORMAT
public static final int TYPE_CHOICE_FORMAT
A constant declaring that the format-type is a choice-format.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FormatSpecification
public FormatSpecification()
Creates an empty object. This object must be filled with valid values by callingredefine(int, String)
later.
-
-
Method Detail
-
redefine
public void redefine(int type, String formatString)
Redefines the values stored in this specification object.- Parameters:
type
- the type, one of the constants declared in this class.formatString
- the format string.
-
getType
public int getType()
Returns the type of the format string contained in this class.- Returns:
- the type.
-
getFormatString
public String getFormatString()
Returns the raw-format-string.- Returns:
- the format string.
-
-