be.idamf.sofa.mapper
Interface Mapper<A,B>

Type Parameters:
A - object type A
B - object type B
All Known Subinterfaces:
BidirectionalMapper<A,B>, StrategyMapper<A,B>
All Known Implementing Classes:
AbstractBidirectionalMapper, AbstractBidirectionalStrategyMapper, AbstractMapper

public interface Mapper<A,B>

A Mapper is capable of mapping an object of type A to an object of type B.


Method Summary
 B mapAToB(A a)
          Map an object of type A to an object of type B.
<C extends Collection<B>>
C
mapCollectionOfAToCollectionOfB(Collection<A> collectionOfA, C emptyMutableCollectionOfB)
          Map a collection of objects of type A to a collection of objects of type B.
 

Method Detail

mapAToB

B mapAToB(A a)
Map an object of type A to an object of type B.

Parameters:
a - the object of type A
Returns:
an object of type B

mapCollectionOfAToCollectionOfB

<C extends Collection<B>> C mapCollectionOfAToCollectionOfB(Collection<A> collectionOfA,
                                                            C emptyMutableCollectionOfB)
Map a collection of objects of type A to a collection of objects of type B.

Type Parameters:
C - The type of the resulting collection
Parameters:
collectionOfA - the collection of objects of type A
emptyMutableCollectionOfB - an instance of the collection of objects of type B, which will be filled up
Returns:
a collection of objects of type B


Copyright © 2013 iDA-MediaFoundry. All Rights Reserved.