Package com.helger.xml.microdom.util
Class MicroVisitor
- java.lang.Object
-
- com.helger.xml.microdom.util.MicroVisitor
-
@Immutable public final class MicroVisitor extends Object
Helper class that visits aIMicroNodewith a callback.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
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.
-
-