public class LinkRegexFilter extends java.lang.Object implements NodeFilter
构造器和说明 |
---|
LinkRegexFilter(java.lang.String regexPattern)
Creates a LinkRegexFilter that accepts LinkTag nodes containing
a URL that matches the supplied regex pattern.
|
LinkRegexFilter(java.lang.String regexPattern,
boolean caseSensitive)
Creates a LinkRegexFilter that accepts LinkTag nodes containing
a URL that matches the supplied regex pattern.
|
public LinkRegexFilter(java.lang.String regexPattern)
regexPattern
- The pattern to match.public LinkRegexFilter(java.lang.String regexPattern, boolean caseSensitive)
regexPattern
- The regex pattern to match.caseSensitive
- Specifies case sensitivity for the matching process.public boolean accept(Node node)
accept
在接口中 NodeFilter
node
- The node to check.true
if the node is a link with the pattern.