public class StringToPeriodConverter
extends java.lang.Object
implements org.springframework.core.convert.converter.GenericConverter
Converter
to convert from a String
to a Period
. Supports
Period.parse(CharSequence)
as well a more readable form.PeriodUnit
Constructor and Description |
---|
StringToPeriodConverter() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convert(java.lang.Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
java.util.Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> |
getConvertibleTypes() |
public java.util.Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
getConvertibleTypes
in interface org.springframework.core.convert.converter.GenericConverter
public java.lang.Object convert(java.lang.Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
convert
in interface org.springframework.core.convert.converter.GenericConverter