Package net.sf.basedb.util.collections
Interface CollectionTransformer<S,D>
-
- Type Parameters:
D
- The element type contained in the destination collectionS
- The element type of the source collection
- All Known Implementing Classes:
AddAllTransformer
,BasicItemToIdTransformer
,MultiStepCollectionTransformer
,RemoveAllTransformer
public interface CollectionTransformer<S,D>
Allows a collection to be transformed by applying some operation to it. The transformed items should be added to the destination collection. The source collection is not allowed to be modified. Client applications should NOT use the same collection as both source and destination since that may interfere with iterators on the source collection. The destination collection may contain elements of the same or a different type as the source collection.- Version:
- 2.10
- Author:
- Nicklas
- Last modified
- $Date: 2009-01-13 09:20:26 +0100 (ti, 13 jan 2009) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
transform(Collection<? extends S> source, Collection<? super D> destination)
Transform the source collection and store the changes in the destination collection.
-
-
-
Method Detail
-
transform
int transform(Collection<? extends S> source, Collection<? super D> destination)
Transform the source collection and store the changes in the destination collection.- 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.
-
-