fr.umlv.tatoo.cc.common.xml
Class Converter

java.lang.Object
  extended by fr.umlv.tatoo.cc.common.xml.Converter

public class Converter
extends Object

Convert a String into a specific type.

Author:
remi

Constructor Summary
protected Converter()
           
 
Method Summary
<T> T
convert(String value, Class<T> clazz)
           
static Converter getDefaultConverter()
           
protected  boolean parseBoolean(String text)
           
protected  char parseChar(String text)
           
protected  double parseDouble(String text)
           
protected
<E extends Enum<E>>
E
parseEnum(String text, Class<E> clazz)
           
protected  int parseInt(String text)
           
protected  String parseString(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Converter

protected Converter()
Method Detail

parseChar

protected char parseChar(String text)

parseString

protected String parseString(String text)

parseInt

protected int parseInt(String text)

parseDouble

protected double parseDouble(String text)

parseBoolean

protected boolean parseBoolean(String text)

parseEnum

protected <E extends Enum<E>> E parseEnum(String text,
                                          Class<E> clazz)

convert

public <T> T convert(String value,
                     Class<T> clazz)

getDefaultConverter

public static Converter getDefaultConverter()