|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Filter
This interface defines the methods any general filter should implement.
The function of a filter is simple: given an object as argument, it tests
whether the object matches the filter's set of rules, by calling the accept method.
The rules are specified by setPattern and setMode.
setPattern defines an abstract object to be used as the filter pattern and
setMode defines the operation mode of the filter. e.g. StringFilter has 3 modes:
EQUALS, CONTAINS and BEGINS_WITH.
| Method Summary | |
|---|---|
boolean |
accept(Object o)
Matches a specified object against the current filter. |
String[] |
getDescriptions()
Returns a string array representing the filter options presented to the user. |
int |
getMode()
Returns the current filter operation mode. |
Object |
getPattern()
Returns the object used as the filter pattern. |
void |
setMode(int mode)
Sets the operation mode of the filter. |
void |
setPattern(Object pattern)
Defines an abstract object to be used as the filter pattern. |
| Method Detail |
|---|
boolean accept(Object o)
o - the object we want to match
String[] getDescriptions()
int getMode()
Object getPattern()
void setMode(int mode)
mode - the operation modevoid setPattern(Object pattern)
pattern - the filter pattern
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||