Spring Framework

org.springframework.core.convert.converter
Interface Converter<S,T>

All Known Implementing Classes:
DeserializingConverter, SerializingConverter

public interface Converter<S,T>

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.

Since:
3.0
Author:
Keith Donald

Method Summary
 T convert(S source)
          Convert the source of type S to target type T.
 

Method Detail

convert

T convert(S source)
Convert the source of type S to target type T.

Parameters:
source - the source object to convert, which must be an instance of S
Returns:
the converted object, which must be an instance of T
Throws:
java.lang.IllegalArgumentException - if the source could not be converted to the desired target type

Spring Framework