org.wamblee.collections
Class CollectionFilter

java.lang.Object
  extended by org.wamblee.collections.CollectionFilter

public class CollectionFilter
extends java.lang.Object


Constructor Summary
CollectionFilter()
           
 
Method Summary
static
<T> void
filter(java.util.Collection<T> aFrom, java.util.Collection<T> aTo, Condition<T> aCondition)
          Filters a collection by adding all elements in the from collection that satisfy a given condition to the to collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionFilter

public CollectionFilter()
Method Detail

filter

public static <T> void filter(java.util.Collection<T> aFrom,
                              java.util.Collection<T> aTo,
                              Condition<T> aCondition)
Filters a collection by adding all elements in the from collection that satisfy a given condition to the to collection.

Type Parameters:
T - Type of contained element.
Parameters:
aFrom - From container to which the condition is applied.
aTo - To container to which matching elements are added.
aCondition - Condition by which elements are matched.


Copyright © 2010. All Rights Reserved.