public abstract static class TreeVisitor.ByComponent<C,T> extends java.lang.Object implements TreeVisitor
TreeVisitor.Acceptor, TreeVisitor.Action, TreeVisitor.ByComponent<C,T>, TreeVisitor.ByTreePath<T>
Constructor and Description |
---|
ByComponent(C component,
java.lang.Class<? extends T> type) |
ByComponent(C component,
Function<java.lang.Object,? extends T> converter) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
contains(T pathComponent,
C thisComponent) |
protected boolean |
matches(T pathComponent,
C thisComponent) |
protected TreeVisitor.Action |
visit(T component) |
TreeVisitor.Action |
visit(javax.swing.tree.TreePath path) |
public TreeVisitor.Action visit(javax.swing.tree.TreePath path)
visit
in interface TreeVisitor
path
- a currently visited pathprotected TreeVisitor.Action visit(T component)
component
- a last component of the current pathprotected boolean matches(T pathComponent, C thisComponent)
pathComponent
- a last component of the current paththisComponent
- a seeking componenttrue
if both components match each other