Class MicroVisitor


  • @Immutable
    public final class MicroVisitor
    extends Object
    Helper class that visits a IMicroNode with a callback.
    Author:
    Philip Helger
    • 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 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.