org.chwf.converter.basic
Class BaseNumberConverter

java.lang.Object
  |
  +--org.chwf.converter.Converter
        |
        +--org.chwf.converter.basic.BaseNumberConverter
Direct Known Subclasses:
ByteConverter, DoubleConverter, FloatConverter, IntegerConverter, LongConverter, ShortConverter

public abstract class BaseNumberConverter
extends Converter

Superclass for numeric converters.

Author:
Paul Strack

Constructor Summary
BaseNumberConverter()
           
 
Method Summary
 java.lang.String format(java.lang.Object value)
          Format the conversion type as a string.
 java.lang.Number parseNumber(java.lang.String value)
          Parse the string value to the conversion type.
 
Methods inherited from class org.chwf.converter.Converter
convert, getConverter, getConverter, getType, isSimpleType, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseNumberConverter

public BaseNumberConverter()
Method Detail

parseNumber

public java.lang.Number parseNumber(java.lang.String value)
                             throws ConversionException
Parse the string value to the conversion type.

Parameters:
value - The value being parsed.
Returns:
The resulting object.
Throws:
ConversionException - If parsing fails.

format

public java.lang.String format(java.lang.Object value)
Format the conversion type as a string.

Overrides:
format in class Converter
Parameters:
value - The value being format.
Returns:
The resulting string.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.