Class TreeWalker<T>

java.lang.Object
org.qubership.atp.ram.models.tree.TreeWalker<T>

public class TreeWalker<T> extends Object
  • 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 element
      childrenSupplier - method for retrieving potential element children
      preOperation - element operation function
    • walkWithPostProcess

      public void walkWithPostProcess(T root, Function<T,List<T>> childrenSupplier, BiConsumer<T,T> pastOperation)