org.xorm.util
Class TypeConverter

java.lang.Object
  |
  +--org.xorm.util.TypeConverter

public class TypeConverter
extends Object

Contains static methods for converting between various Java types.


Constructor Summary
TypeConverter()
           
 
Method Summary
static Object convertToType(Object input, Class clazz)
          Calls through to the three-argument version of this method, using null as the value for the format String.
static Object convertToType(Object input, Class clazz, String format)
          Converts the input object into a return value of the type requested.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeConverter

public TypeConverter()
Method Detail

convertToType

public static Object convertToType(Object input,
                                   Class clazz)
Calls through to the three-argument version of this method, using null as the value for the format String.


convertToType

public static Object convertToType(Object input,
                                   Class clazz,
                                   String format)
Converts the input object into a return value of the type requested. Currently, the following classes are supported: String, Integer, Long, BigDecimal, Float, Double, Boolean. Dates will be converted according to the format string, using the syntax for java.text.SimpleDateFormat.



$Header: /cvsroot/xorm/xorm/docs/api/org/xorm/util/TypeConverter.html,v 1.4 2004/05/30 08:55:10 wbiggs Exp $