Constructor and Description |
---|
StringToTimestampConverter(DateFormat format) |
StringToTimestampConverter(String pattern) |
Modifier and Type | Method and Description |
---|---|
protected Class<Timestamp> |
destinationClass() |
Timestamp |
doConvert(String source)
Converts instance of S to T.
|
protected Class<String> |
sourceClass() |
canConvert, convert
public StringToTimestampConverter(String pattern)
pattern
- pattern to use for conversionpublic StringToTimestampConverter(DateFormat format)
format
- DateFormat to use for conversionprotected Class<String> sourceClass()
sourceClass
in class ConverterAdapter<String,Timestamp>
protected Class<Timestamp> destinationClass()
destinationClass
in class ConverterAdapter<String,Timestamp>
public Timestamp doConvert(String source) throws ParseException
ConverterAdapter
doConvert
in class ConverterAdapter<String,Timestamp>
source
- instance of String or nullParseException
- if conversion failedCopyright © 2020 JavaLite. All rights reserved.