|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.filter.AbstractFilter<T> com.jidesoft.filter.RegexFilter<T>
public class RegexFilter<T>
A filter implements filtering a string based the regular expression as defined in Java Pattern
class.
Field Summary | |
---|---|
protected boolean |
_beginWith
|
protected Pattern |
_regex
|
Fields inherited from interface com.jidesoft.filter.Filter |
---|
ALL, CUSTOM, NULL, SEPARATOR |
Constructor Summary | |
---|---|
RegexFilter()
|
|
RegexFilter(String pattern)
|
Method Summary | |
---|---|
protected String |
convertElementToString(T value)
Converts an element to String. |
protected String |
convertFromPatternToRegex(String pattern)
Converts the input pattern to the pattern used in Java Pattern class. |
protected Pattern |
createRegexPattern()
Creates regex pattern to search. |
boolean |
equals(Object obj)
|
String |
getPattern()
Gets the pattern string. |
String |
getPreference(Class<?> clazz,
ConverterContext converterContext)
Gets the preference while persisting this filter. |
boolean |
isBeginWith()
Checks if the filter only matches the pattern from the beginning of the string. |
boolean |
isCaseSensitive()
Checks if the filter is case sensitive. |
boolean |
isEndWith()
Checks if the filter only matches the pattern from the end of the string. |
boolean |
isValueFiltered(T value)
Checks to see if the value should be filtered. |
void |
setBeginWith(boolean beginWith)
Sets the begingWidth flag. |
void |
setCaseSensitive(boolean caseSensitive)
Sets the case sensitive. |
void |
setEndWith(boolean endWith)
Sets the endWith flag. |
void |
setPattern(String pattern)
Sets the pattern. |
Object[] |
setPreference(String prefString,
Class<?> clazz,
ConverterContext converterContext)
Sets the preference to load the preference string back to this filter. |
boolean |
stricterThan(Filter inputFilter)
Check if this filter is stricter than the input filter while the two filters are with the same class. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Pattern _regex
protected boolean _beginWith
Constructor Detail |
---|
public RegexFilter()
public RegexFilter(String pattern)
Method Detail |
---|
public boolean isValueFiltered(T value)
Filter
value
- the value to filter
protected Pattern createRegexPattern()
protected String convertElementToString(T value)
value
- the element to be filtered.
protected String convertFromPatternToRegex(String pattern)
pattern
- the input pattern.
Pattern
.public void setPattern(String pattern)
pattern
- the new pattern.Pattern
public String getPattern()
public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive
- true or false.public boolean isBeginWith()
public void setBeginWith(boolean beginWith)
beginWith
- true or false.public boolean isEndWith()
public void setEndWith(boolean endWith)
endWith
- true or false.public boolean stricterThan(Filter inputFilter)
stricterThan
in interface Filter<T>
stricterThan
in class AbstractFilter<T>
inputFilter
- the input filter
public boolean equals(Object obj)
equals
in class Object
public String getPreference(Class<?> clazz, ConverterContext converterContext)
Filter
getPreference
in interface Filter<T>
getPreference
in class AbstractFilter<T>
clazz
- the class type to convert the values inside the filter to stringconverterContext
- the converter context to convert the values inside the filter to string
public Object[] setPreference(String prefString, Class<?> clazz, ConverterContext converterContext)
Filter
setPreference
in interface Filter<T>
setPreference
in class AbstractFilter<T>
prefString
- the preference stringclazz
- the class type to convert the values inside the filter to stringconverterContext
- the converter context to convert the values inside the filter to string
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |