HashTreeTraverser
public class FindTestElementsUpToRootTraverser extends Object implements HashTreeTraverser
Constructor | Description |
---|---|
FindTestElementsUpToRootTraverser(Object nodeToFind) |
Modifier and Type | Method | Description |
---|---|---|
void |
addNode(Object node,
HashTree subTree) |
The tree traverses itself depth-first, calling addNode for each object it
encounters as it goes.
|
List<Controller> |
getControllersToRoot() |
Returns all controllers that where in Tree down to nodeToFind in reverse order (from leaf to root)
|
void |
processPath() |
Process path is called when a leaf is reached.
|
void |
subtractNode() |
Indicates traversal has moved up a step, and the visitor should remove
the top node from its stack structure.
|
public FindTestElementsUpToRootTraverser(Object nodeToFind)
nodeToFind
- Node to findpublic void addNode(Object node, HashTree subTree)
addNode
in interface HashTreeTraverser
node
- the node currently encounteredsubTree
- the HashTree under the node encounteredpublic void subtractNode()
subtractNode
in interface HashTreeTraverser
public void processPath()
HashTreeTraverser.subtractNode()
call. This is a callback method, and should
not be called except by a HashTree during traversal.processPath
in interface HashTreeTraverser
public List<Controller> getControllersToRoot()
Controller
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.