Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org » jfree » report » filter » [javadoc | source]
org.jfree.report.filter
public class: StringFilter [javadoc | source]
java.lang.Object
   org.jfree.report.filter.StringFilter

All Implemented Interfaces:
    RawDataSource, DataFilter

A filter that returns the value from a data source as a String. The value is converted to an String using String.valueOf () which uses Object.toString() to convert the object into the string.

You can specify a default string to return when the value from the data source is null. Initially the string 'null' is used.

Constructor:
 public StringFilter() 
Method from org.jfree.report.filter.StringFilter Summary:
clone,   getDataSource,   getFormatString,   getNullValue,   getRawValue,   getValue,   setDataSource,   setNullValue
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.filter.StringFilter Detail:
 public Object clone() throws CloneNotSupportedException 
    Clones the filter.
 public DataSource getDataSource() 
    Returns the data source for this filter.
 public FormatSpecification getFormatString(ExpressionRuntime runtime,
    Element element,
    FormatSpecification formatSpecification) 
 public String getNullValue() 
    Returns the string used to represent a null value.
 public Object getRawValue(ExpressionRuntime runtime,
    Element element) 
 public Object getValue(ExpressionRuntime runtime,
    Element element) 
    Returns the value obtained from the data source.

    The filter ensures that the returned value is a String, even though the return type is Object (as required by the DataSource interface).

 public  void setDataSource(DataSource ds) 
    Sets the data source for this filter.
 public  void setNullValue(String nullvalue) 
    Sets the string used to represent a null value.