@FunctionalInterface public interface NodeVisitor
NodeVisitoris used for traversing the structure of a
It uses a design pattern called Visitor.
Implement it in order to perform various operations on various
Nodes in sequence.
void visit(Node node)
It should happen soon after its
accept(NodeVisitor) method has been called, with this
NodeVisitor as its parameter argument.
NullPointerException may be thrown. But no guarantees can be made.
node could not be traversed by this
NodeTraversalException may be thrown. But no guarantees can be made.
Nodecurrently being visited
NodeTraversalException- thrown if, and only if,
nodecould not be traversed by this
java.lang.NullPointerException- thrown if, and only if,