Class MicroVisitor

java.lang.Object
com.helger.xml.microdom.util.MicroVisitor

@Immutable public final class MicroVisitor extends Object
Helper class that visits a IMicroNode with a callback.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    visit(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>
    void
    visit(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 be null.
      aCallback - The callback to call. May not be null.
    • 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 be null.
      aChildrenProvider - The child resolver to use. May not be null.
      aCallback - The callback to call. May not be null.