public class RegexStringFilter extends java.lang.Object implements Filter<java.lang.String>
Because regular expression matching is slow, and a common usage is to match
some sort of relative file path, the regular expression is checked to see if
it can be evaluated using much faster calls to
String.endsWith(String)
.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
endsWith |
protected java.util.regex.Pattern |
pattern |
protected java.lang.String |
regex |
Constructor and Description |
---|
RegexStringFilter(java.lang.String regex) |
Modifier and Type | Method and Description |
---|---|
boolean |
filter(java.lang.String obj) |
java.lang.String |
getEndsWith() |
java.lang.String |
getRegex() |
protected void |
optimize() |
java.lang.String |
toString() |
protected java.lang.String regex
protected java.util.regex.Pattern pattern
protected java.lang.String endsWith
Copyright © 2002–2018 PMD. All rights reserved.