public class XPathAttributeMatcher extends AbstractXPathNodeMatcher
IXPathNodeMatcher.MatcherType
EMPTY_NODE_MATCHER
Constructor and Description |
---|
XPathAttributeMatcher(String attrName,
String attrValue,
XPathMatcher matcher) |
Modifier and Type | Method and Description |
---|---|
String |
getAttrName()
Returns the attribute name to match.
|
String |
getAttrValue()
Returns the attribute value to match.
|
int |
getIndexWildcard()
Returns the wildcard index and -1 if no wildcard is defined.
|
IXPathNodeMatcher.MatcherType |
getType()
Returns matcher type.
|
boolean |
hasWildcard()
Returns true if attrValue is wilcard or false otherwise.
|
boolean |
isAny()
Returns true if matcher is any (Node is every time matched) and false
otherwise.
|
boolean |
match(Node testNode,
Collection<String> wildcardValues)
Match the
Node and fill wildcard values if node matcher define
widcard. |
getOwnerMatcher
public XPathAttributeMatcher(String attrName, String attrValue, XPathMatcher matcher)
public IXPathNodeMatcher.MatcherType getType()
IXPathNodeMatcher
public boolean match(Node testNode, Collection<String> wildcardValues)
IXPathNodeMatcher
Node
and fill wildcard values if node matcher define
widcard.testNode
- node to test.wildcardValues
- wildcard values if node matcher define widcard.public String getAttrName()
public String getAttrValue()
public boolean hasWildcard()
public int getIndexWildcard()
public boolean isAny()
IXPathNodeMatcher
Copyright © 2020. All rights reserved.