|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.filter.FormatParser
com.jrefinery.report.filter.NumberFormatParser
com.jrefinery.report.filter.DecimalFormatParser
A filter that parses string values from a data source to a number using the decimal numeric system as base. This filter will parse strings using a java.text.DecimalFormat to create the numeric value for the string from the datasource. If the datasource does not return a string, the required string is formed by applying String.valueOf (Object).
If the string read from the datasource could not be parsed into a number, the NullValue defined by setNullValue(Object) is returned.
NumberFormat
,
Number
,
Serialized FormConstructor Summary | |
DecimalFormatParser()
DefaultConstructor, this object is initialized using a DecimalFormat with the default pattern for this locale. |
Method Summary | |
java.text.DecimalFormat |
getDecimalFormat()
Returns the format for the filter. |
java.lang.String |
getFormatString()
Synthesizes a pattern string that represents the current state of this Format object. |
java.lang.String |
getLocalizedFormatString()
Synthesizes a localized pattern string that represents the current state of this Format object. |
void |
setDecimalFormat(java.text.DecimalFormat format)
Sets the format for the filter. |
void |
setFormatString(java.lang.String format)
Applies a format string to the internal DecimalFormat instance. |
void |
setFormatter(java.text.Format format)
Sets the format for the filter. |
void |
setLocalizedFormatString(java.lang.String format)
Applies a localised format string to the internal DecimalFormat instance. |
Methods inherited from class com.jrefinery.report.filter.NumberFormatParser |
getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberFormat, isGroupingUsed, isValidOutput, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setNumberFormat |
Methods inherited from class com.jrefinery.report.filter.FormatParser |
clone, getDataSource, getFormatter, getNullValue, getValue, setDataSource, setNullValue |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DecimalFormatParser()
Method Detail |
public java.text.DecimalFormat getDecimalFormat()
public void setDecimalFormat(java.text.DecimalFormat format)
format
- the format.
java.lang.NullPointerException
- if the given format is null.public void setFormatter(java.text.Format format)
setFormatter
in class NumberFormatParser
format
- The format.
java.lang.NullPointerException
- if the given format is null
java.lang.ClassCastException
- if the format is no decimal formatpublic java.lang.String getFormatString()
public void setFormatString(java.lang.String format)
DecimalFormat
instance.
format
- the format string.public java.lang.String getLocalizedFormatString()
public void setLocalizedFormatString(java.lang.String format)
DecimalFormat
instance.
format
- the format string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |