Class NBComponentTraversal

java.lang.Object
io.nosqlbench.nb.api.components.core.NBComponentTraversal

public class NBComponentTraversal extends Object
  • Constructor Details

    • NBComponentTraversal

      public NBComponentTraversal()
  • Method Details

    • traverseDepth

      public static Iterator<NBComponent> traverseDepth(NBComponent component)
    • visitDepthFirst

      public static void visitDepthFirst(NBComponent component, NBComponentTraversal.Visitor visitor)
    • visitDepthFirstLimited

      public static void visitDepthFirstLimited(NBComponent component, NBComponentTraversal.FilterVisitor visitor, Predicate<NBComponent> predicate)
      Visits each component. If the component does NOT match the predicate, then NON-matching visitor method applies. Otherwise the MATCHing visitor method applies and the search stops at that node, continuing again for every sibling.
      Parameters:
      component - The component to test and visit
      visitor - The methods for non-matching and matching nodes
      predicate - A test to determine whether to apply the matching predicate and stop searching deeper
    • traverseBreadth

      public static Iterator<NBComponent> traverseBreadth(NBComponent component)