|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrefinery.report.filter.StringFilter
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 Summary | |
StringFilter()
Default constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
Clones the filter. |
DataSource |
getDataSource()
Returns the data source for this filter. |
java.lang.String |
getNullValue()
Returns the string used to represent a null value. |
java.lang.Object |
getValue()
Returns the value obtained from the data source. |
void |
setDataSource(DataSource ds)
Sets the data source for this filter. |
void |
setNullValue(java.lang.String nullvalue)
Sets the string used to represent a null value. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringFilter()
| Method Detail |
public void setNullValue(java.lang.String nullvalue)
nullvalue - the null value.public java.lang.String getNullValue()
public java.lang.Object getValue()
The filter ensures that the returned value is a String, even though the return type is Object (as required by the DataSource interface).
getValue in interface DataSourcepublic DataSource getDataSource()
getDataSource in interface DataTargetpublic void setDataSource(DataSource ds)
setDataSource in interface DataTargetds - the data source.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface DataSourcejava.lang.CloneNotSupportedException - this should never happen.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||