|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.bean.parser.AbstractParser<Date> olg.csv.bean.parser.impl.DateParser
public final class DateParser
Parser dedicated in parsing String into date.
Field Summary | |
---|---|
private Class<? extends Date> |
concreteClass
The concrete class the parser must return. |
private Constructor<? extends Date> |
constructor
the date constructor to invoke on parsing. |
private DateFormat |
dateFormat
the date format to use to parse string as date. |
private static org.slf4j.Logger |
LOGGER
the class Logger. |
Constructor Summary | |
---|---|
DateParser(String format,
Class<? extends Date> concreteClass,
Locale locale)
Constructs a date parser. |
Method Summary | |
---|---|
boolean |
checkconcreteClass(Class<?> concreteClass)
Check if a class is a concrete Date class. |
Date |
parse(String str)
Converts a string into a new instance of |
Methods inherited from class olg.csv.bean.parser.AbstractParser |
---|
getCharacterParser, getConstructorParser, getDateParser, getEnumParser, identifyDefaultParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.slf4j.Logger LOGGER
private final DateFormat dateFormat
private Class<? extends Date> concreteClass
private Constructor<? extends Date> constructor
Constructor Detail |
---|
public DateParser(String format, Class<? extends Date> concreteClass, Locale locale)
format
- the date format.concreteClass
- Si null
, la classe retournée lors du parsing sera
Date
locale
- the locale to apply to this DateParser. May be
null
Method Detail |
---|
public Date parse(String str)
AbstractParser
parse
in class AbstractParser<Date>
str
- the string.
public boolean checkconcreteClass(Class<?> concreteClass)
concreteClass
- the class to check.
Date
class or has
Date class as a super class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |