net.sf.basedb.util.filter
Class FilterUtil
java.lang.Object
net.sf.basedb.util.filter.FilterUtil
public class FilterUtil
- extends Object
Utility class for working with and using filters.
- Version:
- 2.9
- Author:
- Nicklas
- Last modified
- $Date: 2008-10-21 09:20:40 +0200 (Tue, 21 Oct 2008) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterUtil
public FilterUtil()
filter
public static <T> List<T> filter(Collection<? extends T> objects,
Filter<? super T> filter)
- Filter a collection and return a new collection with the
objects that passes the
Filter.evaluate(Object)
method.
If the original collection is null, null is returned. If the
original collection is empty, or if no objects passes the filter
an empty list is returned. If the filter is null a list with all objects
of the original collection is returned. The original collection
is never modifed.
- Parameters:
objects
- The collection of objectsfilter
- The filter
- Returns:
- A new collection, or null if the original collection is null
- Since:
- 2.9