Interface Graph.GraphVisitor<T,U>

Type Parameters:
T - The node value type.
U - The edge value type
Enclosing interface:
Graph<T,U>

public static interface Graph.GraphVisitor<T,U>
Visitor interface for graph traversal.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    visit(T origin, T destination, U edgeValue, int depth)
    Called by the graph during traversal to handle each node in the graph.
  • Method Details

    • visit

      void visit(T origin, T destination, U edgeValue, int depth)
      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.