public class Filter<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Filter(Rule<T> rule)
Deprecated.
Prior implementations of this class did not work as advertised, so
to avoid confusion please use constructors that explicitly specify the desired behaviour
|
Filter(Rule<T>[] rules,
int type)
Constructor.
|
public static final int MATCH_ANY
public static final int MATCH_ALL
public Filter(Rule<T> rule)
rule
- a rule that defines this filterpublic final java.util.Collection<T> filter(java.util.Collection<T> c)
c
- a collection to filterpublic final T[] filter(T[] objects)
objects
- an array to filter