olg.csv.bean.formatter
Class DateFormatter
java.lang.Object
olg.csv.bean.formatter.Formatter<Date>
olg.csv.bean.formatter.DateFormatter
public final class DateFormatter
- extends Formatter<Date>
Class dedicated in Date formatting.
Method Summary |
String |
toString(Date date)
Default implementation based on toString Method of the given t. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dateFormat
private final DateFormat dateFormat
- The date format.
DateFormatter
public DateFormatter(String pattern)
- Constructs a date formatter with the given pattern and default locale.
- Parameters:
pattern
- the date pattern. must not be null
.
DateFormatter
public DateFormatter(String pattern,
Locale locale)
- Parameters:
pattern
- the date pattern. Must not be null
.locale
- the locale. Must not be null
.
toString
public String toString(Date date)
- Description copied from class:
Formatter
- Default implementation based on toString Method of the given t.
- Overrides:
toString
in class Formatter<Date>
- Parameters:
date
- the value to format.
- Returns:
- the formatted value.
Copyright © 2014. All Rights Reserved.