Package org.apache.commons.beanutils2
Interface Converter<T>
- Type Parameters:
T
- the convert type.
- All Known Subinterfaces:
LocaleConverter<T>
- All Known Implementing Classes:
AbstractConverter
,ArrayConverter
,BaseLocaleConverter
,BigDecimalConverter
,BigDecimalLocaleConverter
,BigIntegerConverter
,BigIntegerLocaleConverter
,BooleanConverter
,ByteConverter
,ByteLocaleConverter
,CalendarConverter
,CharacterConverter
,ClassConverter
,ColorConverter
,ConverterFacade
,DateConverter
,DateLocaleConverter
,DateTimeConverter
,DecimalLocaleConverter
,DimensionConverter
,DoubleConverter
,DoubleLocaleConverter
,DurationConverter
,EnumConverter
,FileConverter
,FloatConverter
,FloatLocaleConverter
,InetAddressConverter
,IntegerConverter
,IntegerLocaleConverter
,LocalDateConverter
,LocalDateTimeConverter
,LocaleConverter
,LocalTimeConverter
,LongConverter
,LongLocaleConverter
,MonthDayConverter
,NumberConverter
,OffsetDateTimeConverter
,OffsetTimeConverter
,PathConverter
,PatternConverter
,PeriodConverter
,PointConverter
,ShortConverter
,ShortLocaleConverter
,SqlDateConverter
,SqlDateLocaleConverter
,SqlTimeConverter
,SqlTimeLocaleConverter
,SqlTimestampConverter
,SqlTimestampLocaleConverter
,StringConverter
,StringLocaleConverter
,URIConverter
,URLConverter
,UUIDConverter
,YearConverter
,YearMonthConverter
,ZonedDateTimeConverter
,ZoneIdConverter
,ZoneOffsetConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
General purpose data type converter that can be registered and used within the BeanUtils package to manage the conversion of objects from one type to another.
Converter subclasses bundled with the BeanUtils library are required to be thread-safe, as users of the library may call conversion methods from more than one thread simultaneously.
Custom converter subclasses created by users of the library can be non-thread-safe if the application using them is single-threaded. However it is recommended that they be written in a thread-safe manner anyway.
- Since:
- 1.3
-
Method Summary
-
Method Details
-
convert
Convert the specified input object into an output object of the specified type.- Type Parameters:
R
- the result type.- Parameters:
type
- Data type to which this value should be convertedvalue
- The input value to be converted- Returns:
- The converted value
- Throws:
ConversionException
- if conversion cannot be performed successfully
-