private static class Collector.FirstFinder extends Object implements NodeFilter
NodeFilter.FilterResult
Modifier and Type | Field and Description |
---|---|
private Evaluator |
eval |
private Element |
match |
private Element |
root |
Constructor and Description |
---|
FirstFinder(Element root,
Evaluator eval) |
Modifier and Type | Method and Description |
---|---|
NodeFilter.FilterResult |
head(Node node,
int depth)
Callback for when a node is first visited.
|
NodeFilter.FilterResult |
tail(Node node,
int depth)
Callback for when a node is last visited, after all of its descendants have been visited.
|
FirstFinder(Element root, Evaluator eval)
public NodeFilter.FilterResult head(Node node, int depth)
NodeFilter
head
in interface NodeFilter
node
- the node being visited.depth
- the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node of that will have depth 1.public NodeFilter.FilterResult tail(Node node, int depth)
NodeFilter
tail
in interface NodeFilter
node
- the node being visited.depth
- the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node of that will have depth 1.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses