be.idamf.sofa.mapper
Class AbstractMapper<A,B>
java.lang.Object
be.idamf.sofa.mapper.AbstractMapper<A,B>
- Type Parameters:
A - object type AB - object type B
- All Implemented Interfaces:
- Mapper<A,B>
- Direct Known Subclasses:
- AbstractBidirectionalMapper
public abstract class AbstractMapper<A,B>
- extends Object
- implements Mapper<A,B>
Abstract mapper class, implementing the Mapper.mapCollectionOfAToCollectionOfB(java.util.Collection,
java.util.Collection)
method by just iterating the list and calling the Mapper.mapAToB(Object).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface be.idamf.sofa.mapper.Mapper |
mapAToB |
AbstractMapper
public AbstractMapper()
mapCollectionOfAToCollectionOfB
public <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.
- Specified by:
mapCollectionOfAToCollectionOfB in interface Mapper<A,B>
- Type Parameters:
C - The type of the resulting collection- Parameters:
collectionOfA - the collection of objects of type AemptyMutableCollectionOfB - 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.