Class TreeWalker<T>
java.lang.Object
org.qubership.atp.ram.models.tree.TreeWalker<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwalkWithPostProcess(T root, Function<T, List<T>> childrenSupplier, BiConsumer<T, T> pastOperation) voidwalkWithPreProcess(T root, Function<T, List<T>> childrenSupplier, BiConsumer<T, T> preOperation) Walk through abstract tree structure with some operation which be applied to each element of the tree.
-
Constructor Details
-
TreeWalker
public TreeWalker()
-
-
Method Details
-
walkWithPreProcess
public void walkWithPreProcess(T root, Function<T, List<T>> childrenSupplier, BiConsumer<T, T> preOperation) Walk through abstract tree structure with some operation which be applied to each element of the tree.- Parameters:
root- root tree elementchildrenSupplier- method for retrieving potential element childrenpreOperation- element operation function
-
walkWithPostProcess
-