Package org.savantbuild.util
Interface Graph.GraphConsumer<T,U>
- Type Parameters:
T- The node value type.U- The edge value type
public static interface Graph.GraphConsumer<T,U>
Consumer interface for graph traversal.
-
Method Summary
-
Method Details
-
consume
Called by the graph during traversal to handle each node in the graph. The parameters passed in constitute an edge between two nodes. This method will not visit detached clusters of nodes.- Parameters:
origin- The origin node value.destination- The destination node value.edgeValue- The edge value.depth- The current depth in the graph.isLast- If this is the last node at this depth.- Returns:
- True if the traversal should continue down from the destination node. False if the traversal should exit and resume from the origin node.
-