Package tech.mappie.api
Class ObjectMappie
-
- All Implemented Interfaces:
public abstract class ObjectMappie<FROM extends Object, TO extends Object> implements Mappie<TO>
Base class for object mappers. See the documentation for a complete overview of how to generate object mappers.
For example
class PersonMapper : ObjectMappie<PersonDto, Person>() { override fun map(from: PersonDto) = mapping() }will generate a mapper from
PersonDtotoPerson, assuming bothPersonDtoandPersonhave a resolvable mapping.
-
-
Constructor Summary
Constructors Constructor Description ObjectMappie()
-
Method Summary
Modifier and Type Method Description final ListMappie<TO>getForList()final SetMappie<TO>getForSet()TOmap(FROM from)Map from to an instance of TO. final TOmapNullable(FROM from)Map nullable from to an instance of TO. final List<TO>mapList(List<FROM> from)Map each element in from to an instance of TO. final Set<TO>mapSet(Set<FROM> from)Map each element in from to an instance of TO. -
-
Method Detail
-
getForList
final ListMappie<TO> getForList()
-
mapNullable
final TO mapNullable(FROM from)
-
-
-
-