Interface Converter<s,T>
- Type Parameters:
s- the source typeT- the target type
- All Known Implementing Classes:
DeserializingConverter, serializingConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A converter converts a source object of type
s to a target of type T.
Implementations of this interface are thread-safe and can be shared.
Implementations may additionally implement ConditionalConverter.
- since:
- 3.0
- Author:
- Keith Donald, Josh Cummings
-
Method summary
Modifier and TypeMethodDescriptionConvert the source object of typesto target typeT.
-
Method Details
-
convert
Convert the source object of typesto target typeT.- Parameters:
source- the source object to convert, which must be an instance ofs(nevernull)- Returns:
- the converted object, which must be an instance of
T(potentiallynull) - Throws:
IllegalArgumentException- if the source cannot be converted to the desired target type
-
andThen
-