public class GenericValueConverter extends java.lang.Object implements ValueConverter
Integer
attributes to and from their
String
representation.Constructor and Description |
---|
GenericValueConverter(java.beans.PropertyDescriptor pd)
Creates a new value converter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toAttributeValue(java.lang.Object o)
Converts the attribute to a string.
|
java.lang.Object |
toPropertyValue(java.lang.String s)
Converts a string to a
Integer . |
public GenericValueConverter(java.beans.PropertyDescriptor pd) throws java.beans.IntrospectionException
java.beans.IntrospectionException
public java.lang.String toAttributeValue(java.lang.Object o) throws BeanException
toAttributeValue
in interface ValueConverter
o
- the attribute (Integer
expected).Integer
value.BeanException
- if there was an error during the conversion.public java.lang.Object toPropertyValue(java.lang.String s)
Integer
.toPropertyValue
in interface ValueConverter
s
- the string.Integer
.