net.fortuna.ical4j.filter
Class Filter
java.lang.Object
net.fortuna.ical4j.filter.Filter
public class Filter
extends java.lang.Object
$Id: Filter.java,v 1.8 2008/12/16 12:34:54 fortuna Exp $
Created: Feb 1, 2006
Performs collection filtering based on a set of rules. A filter may dictate whether at least one rule or all rules
are matched.
static int | MATCH_ALL - Indicates that all rules must be matched to include an object in the filtered collection.
|
static int | MATCH_ANY - Indicates that any rule may be matched to include an object in the filtered collection.
|
Filter(Rule rule) - Constructor.
|
Filter(Rule[] rules, int type) - Constructor.
|
Collection | filter(Collection c) - Filter the given collection into a new collection.
|
Object[] | filter(Object[] objects) - Returns a filtered subset of the specified array.
|
Rule[] | getRules()
|
void | setRules(Rule[] rules)
|
MATCH_ALL
public static final int MATCH_ALL
Indicates that all rules must be matched to include an object in the filtered collection.
MATCH_ANY
public static final int MATCH_ANY
Indicates that any rule may be matched to include an object in the filtered collection.
Filter
public Filter(Rule rule)
Constructor.
rule
- a rule that defines this filter
Filter
public Filter(Rule[] rules,
int type)
Constructor.
rules
- an array of rules that define this filter
filter
public final Collection filter(Collection c)
Filter the given collection into a new collection.
c
- a collection to filter
filter
public final Object[] filter(Object[] objects)
Returns a filtered subset of the specified array.
objects
- an array to filter
getRules
public final Rule[] getRules()
setRules
public final void setRules(Rule[] rules)
rules
- The rules to set.