Package com.helger.xml.microdom.util
Class MicroVisitor
java.lang.Object
com.helger.xml.microdom.util.MicroVisitor
Helper class that visits a
IMicroNode with a
callback.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidvisit(IMicroNode aNode, com.helger.commons.hierarchy.visit.IHierarchyVisitorCallback<? super IMicroNode> aCallback) Iterate the passed node and invoke the callback for all child nodes.static <T extends IMicroNode>
voidvisit(T aNode, com.helger.commons.hierarchy.IChildrenProvider<T> aChildrenProvider, com.helger.commons.hierarchy.visit.IHierarchyVisitorCallback<? super T> aCallback) Iterate the passed node and invoke the callback for all child nodes.
-
Method Details
-
visit
public static void visit(@Nonnull IMicroNode aNode, @Nonnull com.helger.commons.hierarchy.visit.IHierarchyVisitorCallback<? super IMicroNode> aCallback) Iterate the passed node and invoke the callback for all child nodes. The callback is not invoked for the passed node itself!- Parameters:
aNode- The node to iterate. May not benull.aCallback- The callback to call. May not benull.
-
visit
public static <T extends IMicroNode> void visit(@Nonnull T aNode, @Nonnull com.helger.commons.hierarchy.IChildrenProvider<T> aChildrenProvider, @Nonnull com.helger.commons.hierarchy.visit.IHierarchyVisitorCallback<? super T> aCallback) Iterate the passed node and invoke the callback for all child nodes. The callback is not invoked for the passed node itself!- Type Parameters:
T- The node type to be visited- Parameters:
aNode- The node to iterate. May not benull.aChildrenProvider- The child resolver to use. May not benull.aCallback- The callback to call. May not benull.
-