Interface VertexVisitor<V>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface VertexVisitor<V>
A visitor for graph vertices during traversal.

This functional interface is called for each vertex visited during graph traversal. The depth parameter indicates the distance from the starting vertex.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    visit(V vertex, int depth)
    Visits a vertex during graph traversal.
  • Method Details

    • visit

      void visit(V vertex, int depth)
      Visits a vertex during graph traversal.
      Parameters:
      vertex - the vertex being visited
      depth - the depth/distance from the starting vertex