[ ] Add engaged method to visitor. The method returns true if the visitor has reached the start path and false in other case. If the visitor has tree path the method returns loc.stateFirstOrRest in other case it always returns true.
[ ] Get rid of processLeaf. processLeaf and order == Order.Sinking equals to enterNode and order == Order.Bubbling equals to leaveNode
[ ] visitor.complete should consider visitor.loc.checkState if available
[ ] (Probably) implement separate tree traversing for hasSize case because in this case visitor should not return prematurely but it is a normal in case of hasTreePath
engaged
method to visitor. The method returnstrue
if the visitor has reached the start path andfalse
in other case. If the visitor has tree path the method returnsloc.stateFirstOrRest
in other case it always returnstrue
.processLeaf
.processLeaf
andorder == Order.Sinking
equals toenterNode
andorder == Order.Bubbling
equals toleaveNode
visitor.complete
should considervisitor.loc.checkState
if availablehasSize
case because in this case visitor should not return prematurely but it is a normal in case ofhasTreePath