public class OnePattern extends EdgePattern
Pattern that matches Nodes that have a single edge
with a given label and a target that matches a given Pattern.
Nodes that have many edges with the given label do not match this pattern, even if there is at most one edge whose target matches the given pattern.
EdgePattern.Range| Constructor and Description |
|---|
OnePattern(QName l,
Pattern predicate)
Creates an instance for a given label and pattern.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(List<Edge> edges)
Indicates whether the pattern matches some of the edges in a given list.
|
String |
name()
Returns the name of the pattern.
|
List<Edge> |
prune(List<Edge> edges)
Returns the edges from a given list which match the pattern.
|
EdgePattern.Range |
range()
Returns the
EdgePattern.Range of the pattern. |
equals, hashCode, isCondition, label, matchLabels, pattern, setAsCondition, setPattern, toString, unsetAsConditionpublic boolean matches(List<Edge> edges)
edges - the list.true if it does, false otherwise.public List<Edge> prune(List<Edge> edges) throws Exception
edges - the list.Exception - if an attempt to match an edge fails with an error.public EdgePattern.Range range()
EdgePattern.Range of the pattern.range in class EdgePatternpublic String name()
name in class EdgePatternCopyright © 2017. All Rights Reserved.