Class RegexFilter

java.lang.Object
com.google.gwt.util.regexfilter.RegexFilter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
WhitelistRegexFilter

public abstract class RegexFilter extends Object implements Serializable
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 Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
    • getValues

      public List<String> getValues()
    • add

      public void add(String regex)
    • addAll

      public void addAll(List<String> newValues)
    • addAll

      public void addAll(RegexFilter regexFilter)
    • isIncluded

      public boolean isIncluded(String query)
    • isIncluded

      public boolean isIncluded(TreeLogger logger, String query)
    • 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.