net.sf.easyweb4j.model.converters.number
Class AbstractNumberConverter

java.lang.Object
  extended by net.sf.easyweb4j.model.converters.number.AbstractNumberConverter
All Implemented Interfaces:
Converter
Direct Known Subclasses:
BigDecimalConverter, BigIntegerConverter, PrimitiveConverter

public abstract class AbstractNumberConverter
extends Object
implements Converter

Handles conversion of Numeric types.

Author:
Chandra Sekar S

Constructor Summary
AbstractNumberConverter(Class<? extends Number> type)
          The numeric type for which this converter is used.
 
Method Summary
protected abstract  Number convert(String value)
           
 Number convert(String[] values)
          Converts given input strings (extracted from the parameter) to a basic type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNumberConverter

public AbstractNumberConverter(Class<? extends Number> type)
The numeric type for which this converter is used.

Parameters:
type - The actual type to be handled by this instance.
Method Detail

convert

public Number convert(String[] values)
               throws FormatException
Description copied from interface: Converter
Converts given input strings (extracted from the parameter) to a basic type.

Specified by:
convert in interface Converter
Parameters:
values - The parameter values.
Returns:
The converted object.
Throws:
FormatException - If the input string is not of compatible format.

convert

protected abstract Number convert(String value)


Copyright © 2009-2010 Chandra Sekar S. All Rights Reserved.