
public class TreeWalkerUtils extends Object
| Constructor and Description |
|---|
TreeWalkerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
proceduralNodeWalk(ComponentLookup lookup,
String startingNodeName,
Consumer<ComponentNode> pre,
Consumer<ComponentNode> post)
Full tree walking of the component node targeted on the node itself.
|
static <A> void |
proceduralWalk(ComponentLookup lookup,
String startingNodeName,
Class<A> klass,
Consumer<A> pre,
Consumer<A> post)
Full Tree walking method targeted on the node's inner object.
|
static void |
treeNodeWalk(ComponentLookup lookup,
String startingNodeName,
Function<ComponentNode,TreeWalkerDiag> func,
Consumer<ComponentNode> post)
Walks the components tree recursively, applying rules of
TreeWalkerDiag (the walk can be interrupted by HANDLING_CHILDREN
(the code is not invoked on children) or STOP (the code abruptly ends) on
the node itself.
|
static <J> void |
treeWalk(ComponentLookup lookup,
String startingNodeName,
Class<J> klass,
Function<J,TreeWalkerDiag> func,
Consumer<J> post)
Walks the components tree recursively, applying rules of
TreeWalkerDiag (the walk can be interrupted by HANDLING_CHILDREN
(the code is not invoked on children) or STOP (the code abruptly ends) on
the node's inner component.
|
public static <A> void proceduralWalk(ComponentLookup lookup, String startingNodeName, Class<A> klass, Consumer<A> pre, Consumer<A> post)
A - the type of the target nodelookup - startingNodeName - the name of the node to start the procedure from.klass - pre - the procedure to apply in pre orderpost - the procedure to apply in post orderpublic static void proceduralNodeWalk(ComponentLookup lookup, String startingNodeName, Consumer<ComponentNode> pre, Consumer<ComponentNode> post)
lookup - startingNodeName - pre - post - public static <J> void treeWalk(ComponentLookup lookup, String startingNodeName, Class<J> klass, Function<J,TreeWalkerDiag> func, Consumer<J> post)
J - the type of nodelookup - startingNodeName - klass - func - post - public static void treeNodeWalk(ComponentLookup lookup, String startingNodeName, Function<ComponentNode,TreeWalkerDiag> func, Consumer<ComponentNode> post)
lookup - startingNodeName - the starting nodefunc - post - Copyright © 2017 LSST. All rights reserved.