public class TreePattern extends AbstractPattern
| Constructor and Description |
|---|
TreePattern(List<EdgePattern> patterns)
Creates and instance with a list of
EdgePatterns. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
matches(Node n)
Indicates whether a node matches a pattern.
|
EdgePattern |
pattern(QName label)
Returns a pattern with a given label, if one exists.
|
List<EdgePattern> |
patterns()
Return the patterns.
|
void |
prune(Node n)
Prunes a node of all the descendants that are not required to match the pattern.
|
String |
toString() |
idPattern, setIdPatternpublic TreePattern(List<EdgePattern> patterns)
EdgePatterns.patterns - the patternspublic boolean matches(Node n)
matches in interface Patternmatches in class AbstractPatternn - the node.true if it does, false otherwise.public void prune(Node n) throws Exception
prune in interface Patternprune in class AbstractPatternn - the node.Exception - if the node does not match the pattern.public List<EdgePattern> patterns()
public EdgePattern pattern(QName label)
label - the label.null.public int hashCode()
hashCode in class AbstractPatternpublic boolean equals(Object obj)
equals in class AbstractPatternCopyright © 2018. All Rights Reserved.