Constructor and Description |
---|
DateTypeConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Object fromValue,
ReifiedType toType)
Return if this converter is able to convert the specified object to the
specified type.
|
Object |
convert(Object source,
ReifiedType toType)
Convert the specified object to an instance of the specified type.
|
void |
setFormat(String format) |
public void setFormat(String format)
public Object convert(Object source, ReifiedType toType) throws Exception
Converter
convert
in interface Converter
source
- The source object s
to convert.toType
- The target type T
.Exception
- If the conversion cannot succeed. This exception should
not be thrown when the canConvert
method has
returned true
.public boolean canConvert(Object fromValue, ReifiedType toType)
Converter
canConvert
in interface Converter
fromValue
- The source object s
to convert.toType
- The target type T
.true
if the conversion is possible,
false
otherwise.Copyright © 2013. All Rights Reserved.