java.lang.Object
io.jenetics.ext.rewriting.TreeMatchResult<V>
The result of a tree match operation. It contains the matching tree and the
tree variables which matches the matching tree.
final Tree<String, ?> tree = ...;
final TreePattern<String> pattern = ...;
final Optional<TreeMatchResult<String>> result = pattern.match(tree);
result.ifPresent(r -> {assert r.tree() == tree;});
- Since:
- 5.0
- Version:
- 5.0
- See Also:
-
Method Summary
-
Method Details
-
tree
The node (tree), which has been matched by some pattern. This tree is the argument of theTreePattern.match(Tree)
call, in the case of a match.final Tree<String, ?> tree = ...; final TreePattern<String> pattern = ...; final Optional<TreeMatchResult<String>> result = pattern.match(tree); result.ifPresent(r -> {assert r.tree() == tree;});
- Returns:
- node (tree), which has been matched by some pattern
-
vars
The variables involved while matching the treetree()
.- Returns:
- variables involved while matching the tree
tree()
.
-
hashCode
-
equals
-
toString
-