org.chwf.converter
Class DefaultConverter
java.lang.Object
|
+--org.chwf.converter.Converter
|
+--org.chwf.converter.DefaultConverter
- public class DefaultConverter
- extends Converter
Default converter class. It does not support the parse method, and uses the
object's toString()
method for formatting.
- Author:
- Paul Strack
Method Summary |
java.lang.String |
format(java.lang.Object value)
Format the object as a string using the its toString()
method. |
boolean |
isSimpleType()
Overrides the superclass method. |
java.lang.Object |
parse(java.lang.String value)
Always fails for the default converter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultConverter
public DefaultConverter()
parse
public java.lang.Object parse(java.lang.String value)
throws ConversionException
- Always fails for the default converter.
- Overrides:
parse
in class Converter
- Parameters:
value
- The value being parsed.- Returns:
- The resulting object.
- Throws:
ConversionException
- Always thrown for default converter.
format
public java.lang.String format(java.lang.Object value)
- Format the object as a string using the its
toString()
method.
- Overrides:
format
in class Converter
- Parameters:
value
- The value being format.- Returns:
- The resulting string.
isSimpleType
public boolean isSimpleType()
- Overrides the superclass method.
- Overrides:
isSimpleType
in class Converter
- Returns:
- Always false; types using the default converter are by definition
not simple.
Copyright © 2002-2004, Paul Strack. All Rights Reserved.