|
||||||||||
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 | +--com.jrefinery.report.filter.SimpleDateFormatParser
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.
If the object read from the datasource is no string, the value is converted to string using String.valueOf (Object)
This implementation uses a SimpleDateFormat and grants more control over the parsing results.
SimpleDateFormat
,
Serialized FormConstructor Summary | |
SimpleDateFormatParser()
DefaultConstructor. |
Method Summary | |
java.lang.String |
getFormatString()
Returns the formatString for this SimpleDateFormat. |
java.lang.String |
getLocalizedFormatString()
Returns a localized formatString for this SimpleDateFormat. |
java.text.SimpleDateFormat |
getSimpleDateFormat()
Returns the SimpleDateFormat object used in this parser. |
void |
setFormatString(java.lang.String format)
defines the formatString for this SimpleDateFormat. |
void |
setFormatter(java.text.Format format)
Sets the date format for the filter. |
void |
setLocalizedFormatString(java.lang.String format)
defines the localized formatString for this SimpleDateFormat. |
void |
setSimpleDateFormat(java.text.SimpleDateFormat format)
Sets the date format for the parser. |
Methods inherited from class com.jrefinery.report.filter.DateFormatParser |
getDateFormat, isValidOutput, setDateFormat, setNullValue |
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 SimpleDateFormatParser()
Method Detail |
public java.text.SimpleDateFormat getSimpleDateFormat()
public void setSimpleDateFormat(java.text.SimpleDateFormat format)
format
- The format.
java.lang.NullPointerException
- if the format given is nullpublic void setFormatter(java.text.Format format)
setFormatter
in class DateFormatParser
format
- The format.
java.lang.NullPointerException
- if the format given is null
java.lang.ClassCastException
- if the format given is no DateFormatpublic java.lang.String getFormatString()
SimpleDateFormat
public void setFormatString(java.lang.String format)
format
- the formatString
java.lang.IllegalArgumentException
- if the string is invalidpublic java.lang.String getLocalizedFormatString()
SimpleDateFormat
public void setLocalizedFormatString(java.lang.String format)
format
- the formatString
java.lang.IllegalArgumentException
- if the string is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |