Class DFTreeVisitor<T>
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.tree.traversal.DFTreeVisitor<T>
-
- Type Parameters:
T
- type of tree node payload.
- All Implemented Interfaces:
ITreeVisitor<T>
public abstract class DFTreeVisitor<T> extends Object implements ITreeVisitor<T>
Depth first visitor.Note that this visitor should not be used for large trees, as the stack depth required can become quite large.
- See Also:
DFIterator
-
-
Constructor Summary
Constructors Constructor Description DFTreeVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
processPayload(T value, int level)
Override in subclasses to act on the values in depth first order.void
visit(ITreeNode<T> node)
-
-
-
Method Detail
-
visit
public void visit(ITreeNode<T> node)
- Specified by:
visit
in interfaceITreeVisitor<T>
-
processPayload
protected abstract void processPayload(T value, int level)
Override in subclasses to act on the values in depth first order.- Parameters:
value
- the payload.level
- the tree level.
-
-