net.sf.basedb.util.biomaterial
Class ChildrenTransformer<I extends MeasuredBioMaterial>
java.lang.Object
net.sf.basedb.util.biomaterial.ChildrenTransformer<I>
- All Implemented Interfaces:
- CollectionTransformer<I,I>
public class ChildrenTransformer<I extends MeasuredBioMaterial>
- extends Object
- implements CollectionTransformer<I,I>
Collection transformer that given a collection of biomaterials
finds all children of the same type.
- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-08-11 11:09:06 +0200 (Thu, 11 Aug 2011) $
Method Summary |
int |
transform(Collection<? extends I> source,
Collection<? super I> destination)
Transform the source collection and store the changes in the
destination collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dc
private final DbControl dc
query
private final ItemQuery<I extends MeasuredBioMaterial> query
copySources
private final boolean copySources
ChildrenTransformer
public ChildrenTransformer(DbControl dc,
boolean copySources,
ItemQuery<I> query)
transform
public int transform(Collection<? extends I> source,
Collection<? super I> destination)
- Description copied from interface:
CollectionTransformer
- Transform the source collection and store the changes in the
destination collection.
- Specified by:
transform
in interface CollectionTransformer<I extends MeasuredBioMaterial,I extends MeasuredBioMaterial>
- Parameters:
source
- The source collectiondestination
- The destination collection
- Returns:
- The number of elements affected in the destination collection. Note!
This value may have a different meaning depending on the implementor. For
example, some implementor may add elements while other implementor may
remove elements. A return value of 0 should always indicate that no modifications
has been made to the destination collection.