S
- conversion source class.D
- conversion destination class.public final class Converter<S,D> extends Object implements MappingExecutor<S,D>
Constructor and Description |
---|
Converter(Class<S> sourceClass,
Class<D> destinationClass,
java.util.function.BiFunction<Mapper,S,D> convertAction)
Creates converter instance using
Mapper reference during execution. |
Converter(Class<S> sourceClass,
Class<D> destinationClass,
java.util.function.Function<S,D> convertAction)
Creates converter instance not using
Mapper reference during execution. |
Modifier and Type | Method and Description |
---|---|
D |
convert(Mapper caller,
S source)
Performs conversion.
|
Class<D> |
getDestinationClass()
Returns destination class supported by this converter.
|
Class<S> |
getSourceClass()
Returns source class supported by this converter.
|
public Converter(Class<S> sourceClass, Class<D> destinationClass, java.util.function.Function<S,D> convertAction)
Mapper
reference during execution.sourceClass
- source class.destinationClass
- destination class.convertAction
- conversion action.public Converter(Class<S> sourceClass, Class<D> destinationClass, java.util.function.BiFunction<Mapper,S,D> convertAction)
Mapper
reference during execution.sourceClass
- source class.destinationClass
- destination class.convertAction
- conversion action.public Class<S> getSourceClass()
getSourceClass
in interface MappingExecutor<S,D>
public Class<D> getDestinationClass()
getDestinationClass
in interface MappingExecutor<S,D>
Copyright © 2014. All rights reserved.