olg.csv.bean.formatter
Class Formatter<T>
java.lang.Object
olg.csv.bean.formatter.Formatter<T>
- Type Parameters:
T
- the class the formatter is responsible to transform.
- Direct Known Subclasses:
- ArrayFormatter, DateFormatter, ODSReader.ODSCellFormatter
public class Formatter<T>
- extends Object
Allows to represent an object as a String.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Formatter
public Formatter()
toString
public String toString(T t)
- Default implementation based on toString Method of the given t.
- Parameters:
t
- the value to format.
- Returns:
- the formatted value.
getDateFormatter
public static Formatter<Date> getDateFormatter(String pattern,
Locale locale)
- Returns a new instance of a formatter specialized in formatting Date as
String.
- Parameters:
pattern
- pattern. Must be a not null and valid Date pattern.locale
- the locale to used in date formatting.
- Returns:
- the Date formatter.
Copyright © 2014. All Rights Reserved.