com.google.gwt.util.regexfilter

## Class RegexFilter

- java.lang.Object
- - com.google.gwt.util.regexfilter.RegexFilter

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  WhitelistRegexFilter

    public abstract class RegexFilter
    extends java.lang.Object
    implements java.io.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:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`RegexFilter()`
`RegexFilter(TreeLogger logger, java.util.List<java.lang.String> values)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract boolean` `acceptByDefault()` If no pattern matches, whether the query should be considered as an accept.
`void` `add(java.lang.String regex)`
`void` `addAll(java.util.List<java.lang.String> newValues)`
`void` `addAll(RegexFilter regexFilter)`
`protected abstract boolean` `entriesArePositiveByDefault()` If a pattern is not preceded by + or -, whether the query should be considered positive.
`java.util.List<java.lang.String>` `getValues()`
`boolean` `isEmpty()`
`boolean` `isIncluded(java.lang.String query)`
`boolean` `isIncluded(TreeLogger logger, java.lang.String query)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RegexFilter

    public RegexFilter()

#### RegexFilter

    public RegexFilter(TreeLogger logger,
                       java.util.List<java.lang.String> values)
                throws UnableToCompleteException

Throws:
  `UnableToCompleteException`

### Method Detail

#### isEmpty

    public boolean isEmpty()

#### getValues

    public java.util.List<java.lang.String> getValues()

#### add

    public void add(java.lang.String regex)

#### addAll

    public void addAll(java.util.List<java.lang.String> newValues)

#### addAll

    public void addAll(RegexFilter regexFilter)

#### isIncluded

    public boolean isIncluded(java.lang.String query)

#### isIncluded

    public boolean isIncluded(TreeLogger logger,
                              java.lang.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.