public class DateFormatParser extends FormatParser
Constructor and Description |
---|
DateFormatParser()
Creates a new 'date format parser'.
|
Modifier and Type | Method and Description |
---|---|
DateFormat |
getDateFormat()
Returns the format for this filter.
|
Object |
getValue(ExpressionRuntime runtime,
ReportElement element)
Returns the parsed object.
|
protected boolean |
isValidOutput(Object o)
Checks whether the given value is already a valid result.
|
void |
setDateFormat(DateFormat format)
Sets the format for the filter.
|
void |
setFormatter(Format format)
Sets the format for the filter.
|
void |
setNullValue(Object nullvalue)
Sets the value that will be displayed if the data source supplies a null value.
|
clone, getDataSource, getFormatter, getNullValue, setDataSource
public DateFormat getDateFormat()
NullPointerException
- if the given format is nullpublic void setDateFormat(DateFormat format)
format
- The format.NullPointerException
- if the given format is nullpublic void setFormatter(Format format)
setFormatter
in class FormatParser
format
- The format.NullPointerException
- if the given format is nullClassCastException
- if an invalid formater is set.public Object getValue(ExpressionRuntime runtime, ReportElement element)
FormatParser
getValue
in interface DataSource
getValue
in class FormatParser
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.element
- the element for which the data is computed.public void setNullValue(Object nullvalue)
setNullValue
in class FormatParser
nullvalue
- the nullvalue returned when parsing failed.ClassCastException
- if the value is no date or not null.protected boolean isValidOutput(Object o)
isValidOutput
in class FormatParser
o
- the value.Copyright © 2017 Hitachi Vantara. All rights reserved.