|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.filter.StringFilter
public class StringFilter
A string filter. This filter has three operation modes: EQUALS, CONTAINS and BEGINS_WITH. Also, it can be case sensitive/insensitive.
| Field Summary | |
|---|---|
static int |
BEGINS_WITH
The mode that tests if a string begins with the supplied object. |
protected boolean |
caseSensitive
boolean denoting case sensitivity. |
static int |
CONTAINS
The mode that tests if a string is contained in the supplied object. |
static int |
EQUALS
The mode that tests for equality of the supplied object. |
protected int |
mode
The current filter mode. |
protected String[] |
options
The options presented to the user. |
protected String |
pattern
The filter expression. |
| Constructor Summary | |
|---|---|
StringFilter()
Constructs a StringFilter with a default CONTAINS operation mode. |
|
| Method Summary | |
|---|---|
boolean |
accept(Object value)
Matches a specified object against the current filter. |
boolean |
accept(String expression)
Matches the String expression 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. |
boolean |
isCaseSensitive()
Determines if this string filter is case sensitive. |
void |
setCaseSensitive(boolean caseSensitive)
Sets the case sensitivity of this string filter. |
void |
setMode(int mode)
Sets the operation mode of the filter. |
void |
setPattern(Object exp)
Defines an abstract object to be used as the filter pattern. |
void |
setPattern(String pattern)
Sets the filter pattern as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EQUALS
public static final int CONTAINS
public static final int BEGINS_WITH
protected int mode
protected boolean caseSensitive
protected String pattern
protected String[] options
| Constructor Detail |
|---|
public StringFilter()
| Method Detail |
|---|
public boolean accept(Object value)
accept in interface Filtervalue - the object we want to match
public boolean accept(String expression)
expression against the current filter.
expression - the string to match
public String[] getDescriptions()
getDescriptions in interface Filterpublic int getMode()
getMode in interface Filterpublic Object getPattern()
getPattern in interface Filterpublic boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive - the case sensitivitypublic void setMode(int mode)
setMode in interface Filtermode - the operation modepublic void setPattern(Object exp)
setPattern in interface Filterexp - the filter patternpublic void setPattern(String pattern)
pattern - the filter pattern
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||