|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.filter.MessageFormatFilter
public class MessageFormatFilter
A filter that formats values from a data source to a string representation.
This filter will format objects using aMessageFormat
to create the string representation for the
number obtained from the datasource.
MessageFormat
,
Serialized FormConstructor Summary | |
---|---|
MessageFormatFilter()
Default constructor. |
Method Summary | |
---|---|
Object |
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,
Element 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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageFormatFilter()
Uses a general number format for the current locale.
Method Detail |
---|
public void setFormatString(String format)
MessageFormat
object used in this implementation.
format
- the message format.public String getFormatString()
public Object getValue(ExpressionRuntime runtime, Element 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 Object 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |