public class ObjectConverterFunctionAdapter<T,R> extends java.lang.Object implements IObjectConverter<T,R>
IFunction
to the IObjectConverter
interface.Constructor and Description |
---|
ObjectConverterFunctionAdapter(IFunction<T,R> function) |
Modifier and Type | Method and Description |
---|---|
R |
convert(T source)
Converts the given source object into the target representation.
|
static <T,R> ObjectConverterFunctionAdapter<T,R> |
create(IFunction<T,R> function)
Creates a new instance of this adapter.
|
protected IFunction<T,R> |
getFunction() |
public static <T,R> ObjectConverterFunctionAdapter<T,R> create(IFunction<T,R> function)
public R convert(T source)
IObjectConverter
convert
in interface IObjectConverter<T,R>
source
- The object to be converted (may be null).