public abstract class AbstractBeanMapper extends Object implements BeanMapper
BeanMapper.| Constructor and Description |
|---|
AbstractBeanMapper()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
mapList(List<?> source,
Class<T> targetClass)
|
<T> List<T> |
mapList(List<?> source,
Class<T> targetClass,
boolean suppressNullValues)
|
<T> Set<T> |
mapSet(Set<?> source,
Class<T> targetClass)
|
<T> Set<T> |
mapSet(Set<?> source,
Class<T> targetClass,
boolean suppressNullValues)
|
<API,S extends API,T extends API> |
mapTypesafe(Class<API> apiClass,
S source,
Class<T> targetClass)
A type-safe variant of
BeanMapper.map(Object, Class) to prevent accidental abuse (e.g. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmappublic <API,S extends API,T extends API> T mapTypesafe(Class<API> apiClass, S source, Class<T> targetClass)
BeanMapperBeanMapper.map(Object, Class) to prevent accidental abuse (e.g. mapping of apples to bananas).mapTypesafe in interface BeanMapperAPI - is a common super-type (interface) of source and targetType.S - is the generic type of source.T - is the generic type to convert to (target).apiClass - is the Class reflecting the <API>.source - is the object to convert.targetClass - is the Class reflecting the type to convert to.null if source is null.public <T> List<T> mapList(List<?> source, Class<T> targetClass)
BeanMapperList with the mapped bean for each entry of
the given List. Uses false for suppressNullValues (see
BeanMapper.mapList(List, Class, boolean)).mapList in interface BeanMapperT - is the generic type to convert the List entries to.source - is the List with the source objects.targetClass - is the Class reflecting the type to convert each List entry to.List with the converted objects. Will be empty is source is
empty or null.public <T> List<T> mapList(List<?> source, Class<T> targetClass, boolean suppressNullValues)
BeanMappermapList in interface BeanMapperT - is the generic type to convert the List entries to.source - is the List with the source objects.targetClass - is the Class reflecting the type to convert each List entry to.suppressNullValues - true if null values shall be suppressed/omitted in the
resulting List, false otherwise.List with the converted objects. Will be empty is source is
empty or null.public <T> Set<T> mapSet(Set<?> source, Class<T> targetClass)
BeanMapperSet with the mapped bean for each entry of the given Set. Uses false for suppressNullValues (see
BeanMapper.mapSet(Set, Class, boolean)).mapSet in interface BeanMapperT - is the generic type to convert the Set entries to.source - is the Set with the source objects.targetClass - is the Class reflecting the type to convert each Set entry to.Set with the converted objects. Will be empty is source is
empty or null.public <T> Set<T> mapSet(Set<?> source, Class<T> targetClass, boolean suppressNullValues)
BeanMappermapSet in interface BeanMapperT - is the generic type to convert the Set entries to.source - is the Set with the source objects.targetClass - is the Class reflecting the type to convert each Set entry to.suppressNullValues - true if null values shall be suppressed/omitted in the
resulting Set, false otherwise.Set with the converted objects. Will be empty is source is
empty or null.Copyright © 2014–2016 OASP-Team. All rights reserved.