Package com.levigo.jadice.server.util
Class NodeTraversal
- java.lang.Object
-
- com.levigo.jadice.server.util.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 Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T extends Throwable>
voidtraverse(Node node, NodeVisitor<T> visitor)
Deprecated.Specify explicitly if subsidiary nodes shall be visited or notstatic <T extends Throwable>
voidtraverse(Node node, NodeVisitor<T> visitor, boolean visitSubsidiaryNodes)
Show the visitor around all nodes of the graph of which node is a part of.
-
-
-
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 graphvisitor
- will be shown all reachable nodesvisitSubsidiaryNodes
- shallsubsidiary nodes
be visited or not- Throws:
T
- a checked exception on behalf of the visitorT 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 notShow the visitor around allNode
s of the graph of which top-level node is a part of. This means that nosubsidiary 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 graphvisitor
- will be shown all reachable nodes- Throws:
T
- a checked exception on behalf of the visitorT extends Throwable
- See Also:
traverse(Node, NodeVisitor, boolean)
-
-