Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.fortuna.ical4j.filter
Class Filter

    java.lang.Object
      net.fortuna.ical4j.filter.Filter

    public class Filter

extends Object

Performs collection filtering based on a set of rules. A filter may dictate whether at least one rule or all rules are matched.

Author:
  Ben Fortuna

Field Summary
`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.

Constructor Summary
`Filter(Rule rule)` Constructor.
`Filter(Rule[] rules, int type)` Constructor.

Method Summary
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MATCH_ANY

    public static final int MATCH_ANY

  Indicates that any rule may be matched to include an object in the filtered collection.

  See Also:
    Constant Field Values

### MATCH_ALL

    public static final int MATCH_ALL

  Indicates that all rules must be matched to include an object in the filtered collection.

  See Also:
    Constant Field Values

Constructor Detail

### Filter

    public Filter(Rule rule)

  Constructor.

  Parameters:
    `rule` - a rule that defines this filter

### Filter

    public Filter(Rule[] rules,
                  int type)

  Constructor.

  Parameters:
    `rules` - an array of rules that define this filter

Method Detail

### filter

    public final Collection filter(Collection c)

  Filter the given collection into a new collection.

  Parameters:
    `c` - a collection to filter
  Returns:
    a filtered collection

### filter

    public final Object[] filter(Object[] objects)

  Returns a filtered subset of the specified array.

  Parameters:
    `objects` - an array to filter
  Returns:
    a filtered array

### getRules

    public final Rule[] getRules()

  Returns:
    Returns the rules.

### setRules

    public final void setRules(Rule[] rules)

  Parameters:
    `rules` - The rules to set.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2007 Modularity. All Rights Reserved.