Filter<java.lang.String>
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 | Description |
---|---|---|
protected java.lang.String |
endsWith |
|
protected java.util.regex.Pattern |
pattern |
|
protected java.lang.String |
regex |
Constructor | Description |
---|---|
RegexStringFilter(java.lang.String regex) |
Modifier and Type | Method | 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.