com.townleyenterprises.filter
Class Filters

java.lang.Object
  extended bycom.townleyenterprises.filter.Filters

public class Filters
extends java.lang.Object

This class provides helper filter operations for collections to both filter and optionally sort the results.

Since:
2.0
Version:
$Id: Filters.java,v 1.3 2004/07/28 10:33:58 atownley Exp $
Author:
Andrew S. Townley

Method Summary
static java.util.Collection filter(java.util.Collection collection, Filter filter)
          This method is used to filter a given collection with the specified filter.
static java.util.List filter(java.util.Collection collection, Filter filter, SortSpecification[] sort)
          This method will filter the given collection and then return a sorted list of the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

filter

public static java.util.Collection filter(java.util.Collection collection,
                                          Filter filter)
This method is used to filter a given collection with the specified filter.

Parameters:
collection - the collection to filter
filter - the filter to be applied
Returns:
the results of the filter as a collection

filter

public static java.util.List filter(java.util.Collection collection,
                                    Filter filter,
                                    SortSpecification[] sort)
This method will filter the given collection and then return a sorted list of the results. The sort specification is provided to order the objects based on the properties and order indicated.

Parameters:
collection - the collection to filter
filter - the filter to be applied
sort - the sort specifications to apply
Returns:
the results of the filter as a List


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.