public class AlternativesPattern extends Object implements PathPattern
Constructor and Description |
---|
AlternativesPattern(PathPattern pattern1,
Pattern pattern2) |
Modifier and Type | Method and Description |
---|---|
Pattern[] |
getAlternatives()
Returns the simple patterns which are part of this set.
|
boolean |
matches(XNode node,
ExprContext context)
Matches specified node against this pattern.
|
public AlternativesPattern(PathPattern pattern1, Pattern pattern2)
public boolean matches(XNode node, ExprContext context) throws EvalException
Pattern
matches
in interface Pattern
node
- node to be matchedcontext
- evaluation contexttrue
if specified node matches this pattern;
false
otherwiseEvalException
- if specified node cannot be matched against this
patternpublic Pattern[] getAlternatives()
PathPattern
getAlternatives
in interface PathPattern