T - the type of the returned valuepublic class FormatConverter<T> extends Object implements PropertyConverter<T>
Formats.
If the value is a number, the appropriate type conversion is applied.| Constructor and Description |
|---|
FormatConverter(Format... formats)
Creates a new instance of a
FormatConverter. |
| Modifier and Type | Method and Description |
|---|---|
T |
convert(Class<? extends T> targetType,
String value)
Converts a value from import file to Java.
|
List<Format> |
getFormats()
All formats to test.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitofpublic FormatConverter(Format... formats)
FormatConverter.formats - the list of formats to try for conversion, the first that throws no ParseException is usedpublic T convert(Class<? extends T> targetType, String value)
PropertyConverterconvert in interface PropertyConverter<T>targetType - the type of the target propertyvalue - the value in the import file@Generated(value="lombok") public List<Format> getFormats()
ParseException is used for conversion.Copyright © 2020 fastnate.org. All rights reserved.