|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.filter.FormatParser | +--com.jrefinery.report.filter.DateFormatParser
Parses a String into a java.util.Date. The string is read from the given datasource and then parsed by the dateformat contained in this FormatParser.
Constructor Summary | |
DateFormatParser()
Creates a new 'date format parser'. |
Method Summary | |
java.text.DateFormat |
getDateFormat()
Returns the format for this filter. |
protected boolean |
isValidOutput(java.lang.Object o)
Checks whether the given value is already a valid result. |
void |
setDateFormat(java.text.DateFormat format)
Sets the format for the filter. |
void |
setFormatter(java.text.Format format)
Sets the format for the filter. |
void |
setNullValue(java.lang.Object nullvalue)
Sets the value that will be displayed if the data source supplies a null value. |
Methods inherited from class com.jrefinery.report.filter.FormatParser |
clone, getDataSource, getFormatter, getNullValue, getValue, setDataSource |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DateFormatParser()
Method Detail |
public java.text.DateFormat getDateFormat()
java.lang.NullPointerException
- if the given format is nullpublic void setDateFormat(java.text.DateFormat format)
format
- The format.
java.lang.NullPointerException
- if the given format is nullpublic void setFormatter(java.text.Format format)
setFormatter
in class FormatParser
format
- The format.
java.lang.NullPointerException
- if the given format is null
java.lang.ClassCastException
- if an invalid formater is set.public void setNullValue(java.lang.Object nullvalue)
The null value for date format parsers is required to be either null or a java.util.Date.
setNullValue
in class FormatParser
nullvalue
- the nullvalue returned when parsing failed.
java.lang.ClassCastException
- if the value is no date or not null.protected boolean isValidOutput(java.lang.Object o)
isValidOutput
in class FormatParser
o
- the value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |