public class MessageFormatFilter extends Object implements DataSource
MessageFormat
to create the string representation for the
number obtained from the datasource.MessageFormat
,
Serialized FormConstructor and Description |
---|
MessageFormatFilter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
MessageFormatFilter |
clone()
Clones this
DataSource . |
String |
getFormatString()
Returns the format string used in the message format.
|
String |
getNullString()
Returns the replacement text if one of the referenced fields in the message is null.
|
Object |
getValue(ExpressionRuntime runtime,
ReportElement element)
Returns the formatted string.
|
void |
setFormatString(String format)
Defines the format string for the
MessageFormat object used in this implementation. |
void |
setNullString(String nullString)
Defines the replacement text that is used, if one of the referenced fields in the message is null.
|
public MessageFormatFilter()
Uses a general number format for the current locale.
public void setFormatString(String format)
MessageFormat
object used in this implementation.format
- the message format.public String getFormatString()
public Object getValue(ExpressionRuntime runtime, ReportElement element)
getValue
in interface DataSource
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.element
- public MessageFormatFilter clone() throws CloneNotSupportedException
DataSource
.clone
in interface DataSource
clone
in class Object
CloneNotSupportedException
- this should never happen.public String getNullString()
public void setNullString(String nullString)
nullString
- the replacement string for null-values.