org.jfree.xml.attributehandlers

Class BooleanAttributeHandler

Implemented Interfaces:
AttributeHandler

public class BooleanAttributeHandler
extends java.lang.Object
implements AttributeHandler

A class that handles the conversion of Boolean attributes to and from their String representation.

Constructor Summary

BooleanAttributeHandler()
Creates a new attribute handler.

Method Summary

String
toAttributeValue(Object o)
Converts the attribute to a string.
Object
toPropertyValue(String s)
Converts a string to a Boolean.

Constructor Details

BooleanAttributeHandler

public BooleanAttributeHandler()
Creates a new attribute handler.

Method Details

toAttributeValue

public String toAttributeValue(Object o)
Converts the attribute to a string.
Specified by:
toAttributeValue in interface AttributeHandler
Parameters:
o - the attribute (Boolean expected).
Returns:
A string representing the Boolean value.

toPropertyValue

public Object toPropertyValue(String s)
Converts a string to a Boolean.
Specified by:
toPropertyValue in interface AttributeHandler
Parameters:
s - the string.
Returns:
a Boolean.