org.hrodberaht.i18n.formatter
Class Formatter<T>

java.lang.Object
  extended by org.hrodberaht.i18n.formatter.Formatter<T>
Direct Known Subclasses:
BooleanFormatter, DateFormatter, NumberFormatter

public class Formatter<T>
extends Object

Simple Java Utils

Since:
1.0
Version:
1.0
Author:
Robert Alexandersson

Field Summary
protected  Locale locale
           
 
Constructor Summary
Formatter()
           
 
Method Summary
 T convertToObject(String string)
           
 String convertToString(T value)
           
static
<T> Formatter<T>
getFormatter(Class<T> aType)
           
static
<T> Formatter<T>
getFormatter(Class<T> aType, DateFormatter.DateConvert dateConvert)
           
static boolean isSupportedType(Class type)
          Returns true if the provided class is an array getType, implements one of the Formatter classes currently supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

protected Locale locale
Constructor Detail

Formatter

public Formatter()
Method Detail

getFormatter

public static <T> Formatter<T> getFormatter(Class<T> aType)

getFormatter

public static <T> Formatter<T> getFormatter(Class<T> aType,
                                            DateFormatter.DateConvert dateConvert)

isSupportedType

public static boolean isSupportedType(Class type)
Returns true if the provided class is an array getType, implements one of the Formatter classes currently supported.

See Also:
getFormatter(Class)

convertToString

public String convertToString(T value)

convertToObject

public T convertToObject(String string)


Copyright © 2011. All Rights Reserved.