Package com.helixframework.mapper
Class MapperAdapter<A,B>
java.lang.Object
com.helixframework.mapper.MapperAdapter<A,B>
- Type Parameters:
A- the source typeB- the target type
- All Implemented Interfaces:
FromMapper<A,,B> Mapper<A,,B> ToMapper<A,B>
Convenience base class for context-aware mappers.
Implementations can override only the context-aware methods and still get the no-context overloads for free.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMaps a value of typeBto typeA.from(B value, MappingContext ctx) Maps a value of typeBto typeAusing the supplied context.Maps a value of typeAto typeB.to(A value, MappingContext ctx) Maps a value of typeAto typeBusing the supplied context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helixframework.mapper.FromMapper
andThen, fromAll, fromAll, fromAllPreservingType, fromAllPreservingType, fromCollection, fromCollection, fromSet, fromSet, fromStream, fromStream, fromStreamMethods inherited from interface com.helixframework.mapper.ToMapper
andThen, toAll, toAll, toAllPreservingType, toAllPreservingType, toCollection, toCollection, toSet, toSet, toStream, toStream, toStream
-
Constructor Details
-
MapperAdapter
public MapperAdapter()
-
-
Method Details
-
to
Description copied from interface:ToMapperMaps a value of typeAto typeB. -
to
Description copied from interface:ToMapperMaps a value of typeAto typeBusing the supplied context. -
from
Description copied from interface:FromMapperMaps a value of typeBto typeA.- Specified by:
fromin interfaceFromMapper<A,B> - Parameters:
value- the source value- Returns:
- the mapped value
-
from
Description copied from interface:FromMapperMaps a value of typeBto typeAusing the supplied context.- Specified by:
fromin interfaceFromMapper<A,B> - Parameters:
value- the source valuectx- additional mapping context- Returns:
- the mapped value
-