lux.compiler
Class SlopCounter
java.lang.Object
lux.xpath.ExpressionVisitor
lux.xpath.ExpressionVisitorBase
lux.compiler.SlopCounter
public class SlopCounter
- extends ExpressionVisitorBase
adds up the number of wildcard ("*" or node()) path steps on the left or
right-hand side of a path; descendant axis steps count as an infinite
number of wildcard steps.
The path distance underlying this function expresses the "vertical"
distance between two sets of nodes. This is really only defined for
expressions separated by some combination of self, child, and
descendant steps, and it counts the number of wildcard (*, node())
steps.
| Methods inherited from class lux.xpath.ExpressionVisitorBase |
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitDefault, visitSubs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SlopCounter
public SlopCounter()
reset
public void reset()
- reset back to the initial state so the counter may be reused.
visit
public AbstractExpression visit(Root root)
- Overrides:
visit in class ExpressionVisitorBase
visit
public AbstractExpression visit(PathStep step)
- Overrides:
visit in class ExpressionVisitorBase
visit
public AbstractExpression visit(FunCall f)
- Overrides:
visit in class ExpressionVisitorBase
visit
public AbstractExpression visit(Sequence seq)
- Overrides:
visit in class ExpressionVisitorBase
visit
public AbstractExpression visit(BinaryOperation exp)
- Overrides:
visit in class ExpressionVisitorBase
getSlop
public Integer getSlop()
isDone
public boolean isDone()
- Overrides:
isDone in class ExpressionVisitor
- Returns:
- true if the visit is done; this allows visits to terminate early
Copyright © 2013. All Rights Reserved.