Class NBComponentTraversal
java.lang.Object
io.nosqlbench.nb.api.components.core.NBComponentTraversal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Iterator<NBComponent> traverseBreadth(NBComponent component) static Iterator<NBComponent> traverseDepth(NBComponent component) static voidvisitDepthFirst(NBComponent component, NBComponentTraversal.Visitor visitor) static voidvisitDepthFirstLimited(NBComponent component, NBComponentTraversal.FilterVisitor visitor, Predicate<NBComponent> predicate) Visits each component.
-
Constructor Details
-
NBComponentTraversal
public NBComponentTraversal()
-
-
Method Details
-
traverseDepth
-
visitDepthFirst
-
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 visitvisitor- The methods for non-matching and matching nodespredicate- A test to determine whether to apply the matching predicate and stop searching deeper
-
traverseBreadth
-