Class NodeTraversal


  • public final class NodeTraversal
    extends Object
    Utility class to traverse a node graph and let a visitor see all nodes in the process.
    • Method Detail

      • traverse

        public static <T extends Throwable> void traverse​(Node node,
                                                          NodeVisitor<T> visitor,
                                                          boolean visitSubsidiaryNodes)
                                                   throws T extends Throwable
        Show the visitor around all nodes of the graph of which node is a part of. No guarantees are made about the order of the traversal.
        Type Parameters:
        T - Type of a visitor's exception
        Parameters:
        node - one node of the graph
        visitor - will be shown all reachable nodes
        visitSubsidiaryNodes - shall subsidiary nodes be visited or not
        Throws:
        T - a checked exception on behalf of the visitor
        T extends Throwable
        Since:
        jadice server 4.3.1.0
      • traverse

        public static <T extends Throwable> void traverse​(Node node,
                                                          NodeVisitor<T> visitor)
                                                   throws T extends Throwable
        Deprecated.
        Specify explicitly if subsidiary nodes shall be visited or not
        Show the visitor around all Nodes of the graph of which top-level node is a part of. This means that no subsidiary nodes will be visited No guarantees are made about the order of the traversal.
        Type Parameters:
        T - Type of a visitor's exception
        Parameters:
        node - one node of the graph
        visitor - will be shown all reachable nodes
        Throws:
        T - a checked exception on behalf of the visitor
        T extends Throwable
        See Also:
        traverse(Node, NodeVisitor, boolean)