net.sf.easyweb4j.model.converters.number
Class AbstractNumberConverter
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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.