Package com.google.gwt.util.regexfilter
Class RegexFilter
java.lang.Object
com.google.gwt.util.regexfilter.RegexFilter
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
WhitelistRegexFilter
This class implements filters that are configured with a sequence of regexes.
Each regex in the sequence can be preceded by a + or a - to indicate whether
it indicates that queries matching the regex should be included or excluded.
Concrete subclasses indicate the default behaviors by overriding
acceptByDefault()
and entriesArePositiveByDefault()
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
If no pattern matches, whether the query should be considered as an accept.void
void
addAll
(RegexFilter regexFilter) void
protected abstract boolean
If a pattern is not preceded by + or -, whether the query should be considered positive.boolean
isEmpty()
boolean
isIncluded
(TreeLogger logger, String query) boolean
isIncluded
(String query)
-
Constructor Details
-
RegexFilter
public RegexFilter() -
RegexFilter
- Throws:
UnableToCompleteException
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
getValues
-
add
-
addAll
-
addAll
-
isIncluded
-
isIncluded
-
acceptByDefault
protected abstract boolean acceptByDefault()If no pattern matches, whether the query should be considered as an accept. -
entriesArePositiveByDefault
protected abstract boolean entriesArePositiveByDefault()If a pattern is not preceded by + or -, whether the query should be considered positive.
-