S
- the type of the input objectT
- the type of the domain objectpublic abstract class AbstractModelConverter<S,T> extends Object implements ModelConverter<S,T>
ModelConverter
implementation.Constructor and Description |
---|
AbstractModelConverter(Class<T> targetType)
Constructs a
AbstractModelConverter . |
Modifier and Type | Method and Description |
---|---|
List<T> |
convert(Iterable<? extends S> objects)
Converts all given source objects into target objects.
|
T |
convert(S source)
Converts the given source object into a new instance of target object.
|
protected T |
instantiateTargetObject(S source)
Instantiates the domain object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert
public AbstractModelConverter(Class<T> targetType)
AbstractModelConverter
.targetType
- the target typepublic T convert(S source)
convert
in interface ModelConverter<S,T>
source
- the source objectpublic List<T> convert(Iterable<? extends S> objects)
convert
in interface ModelConverter<S,T>
objects
- the object, must not be null.