org.jfree.report.util.beans

Class ArrayValueConverter

public class ArrayValueConverter extends Object implements ValueConverter

An ValueConverter that handles Arrays. Conversion to arrays is done using a CSV string.

Author: Thomas Morgner

Constructor Summary
ArrayValueConverter(Class arrayClass, ValueConverter elementConverter)
Creates a new ArrayValueConverter for the given element type and array type.
Method Summary
StringtoAttributeValue(Object o)
Converts an object to an attribute value.
ObjecttoPropertyValue(String s)
Converts a string to a property value.

Constructor Detail

ArrayValueConverter

public ArrayValueConverter(Class arrayClass, ValueConverter elementConverter)
Creates a new ArrayValueConverter for the given element type and array type.

Parameters: arrayClass the array type elementConverter the value converter for the array elements.

Method Detail

toAttributeValue

public String toAttributeValue(Object o)
Converts an object to an attribute value.

Parameters: o the object.

Returns: the attribute value.

Throws: BeanException if there was an error during the conversion.

toPropertyValue

public Object toPropertyValue(String s)
Converts a string to a property value.

Parameters: s the string.

Returns: a property value.

Throws: BeanException if there was an error during the conversion.