Package jodd.typeconverter
Interface TypeConverter<T>
- All Known Implementing Classes:
ArrayConverter,BigDecimalConverter,BigIntegerConverter,BooleanArrayConverter,BooleanConverter,ByteArrayConverter,ByteConverter,CalendarConverter,CharacterArrayConverter,CharacterConverter,ClassArrayConverter,ClassConverter,CollectionConverter,DateConverter,DoubleArrayConverter,DoubleConverter,FileConverter,FloatArrayConverter,FloatConverter,IntegerArrayConverter,IntegerConverter,LocalDateConverter,LocalDateTimeConverter,LocaleConverter,LocalTimeConverter,LongArrayConverter,LongConverter,ShortArrayConverter,ShortConverter,SqlDateConverter,SqlTimeConverter,SqlTimestampConverter,StringArrayConverter,StringConverter,TimeZoneConverter,URIConverter,URLConverter,UUIDConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Object converter interface.
- See Also:
-
Method Summary
-
Method Details
-
convert
Converts object received as parameter into object of another class. For example, anIntegerconverter tries to convert given objects into targetIntegerobject. Converters should try all reasonable ways of conversion into target object, depending on target type.- Parameters:
value- object to convert from- Returns:
- resulting object converted to target type
- Throws:
TypeConversionException- if conversion fails
-
convert
Converts object and returns default value if conversion fails.
-