X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=trunk%2Fsupport%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fcollections%2FCollectionFilter.java;h=75cdcb1ec5c4133fbb047ffd9fa4c65f8d3e036b;hb=6668851ef357c9ca4a5346c03a24af70fcdcf0e3;hp=c52bf7b15a49831e6d431db4e58bff97e3904110;hpb=9f6c7089270bb72931cbea91c2e88192691614da;p=utils diff --git a/trunk/support/general/src/main/java/org/wamblee/collections/CollectionFilter.java b/trunk/support/general/src/main/java/org/wamblee/collections/CollectionFilter.java index c52bf7b1..75cdcb1e 100644 --- a/trunk/support/general/src/main/java/org/wamblee/collections/CollectionFilter.java +++ b/trunk/support/general/src/main/java/org/wamblee/collections/CollectionFilter.java @@ -21,6 +21,14 @@ import org.wamblee.conditions.Condition; public class CollectionFilter { + /** + * Filters a collection by adding all elements in the from collection + * that satisfy a given condition to the to collection. + * @param Type of contained element. + * @param aFrom From container to which the condition is applied. + * @param aTo To container to which matching elements are added. + * @param aCondition Condition by which elements are matched. + */ public static void filter(Collection aFrom, Collection aTo, Condition aCondition) { for (T t: aFrom) { if ( aCondition.matches(t)) {