public class DateFieldProcessor extends Object implements FieldProcessor<Date>
| Constructor and Description |
|---|
DateFieldProcessor(SimpleDateFormat simpleDateFormat,
String locale,
String nullValue,
SimpleDateFormat canonicalFormat) |
| Modifier and Type | Method and Description |
|---|---|
Date |
cast(Object o)
For lenient writer: cast an objet to T type
|
String |
toCanonicalString(String text)
Prepare a value for a canonical String
|
Date |
toObject(String text)
Prepare a value for a consumer
|
String |
toString(Date date)
Prepare a value for CSV file.
|
public DateFieldProcessor(SimpleDateFormat simpleDateFormat, String locale, String nullValue, SimpleDateFormat canonicalFormat)
public Date toObject(String text) throws MetaCSVReadException
FieldProcessortoObject in interface FieldProcessor<Date>text - the CSV valueMetaCSVReadException - if the text can't be converted to a T value.public String toString(Date date)
FieldProcessortoString in interface FieldProcessor<Date>date - the valuepublic String toCanonicalString(String text) throws MetaCSVReadException
FieldProcessortoCanonicalString in interface FieldProcessor<Date>text - the text valueMetaCSVReadException - if the text can't be converted to a T value.public Date cast(Object o)
FieldProcessorcast in interface FieldProcessor<Date>o - the objectCopyright © 2020–2021. All rights reserved.