Interface GraphVisitor<G extends Graph<G,N,E>,N extends Node<G,N,E>,E extends Edge<G,N,E>,V>
-
- Type Parameters:
G- the type ofGraphthat this visitor visitsN- the type ofNodes in the visited graphE- the type ofEdges in the visited graphV- the type of auxiliary tool that the callbacks provided by this visitor can use while visiting the graph
- All Known Subinterfaces:
Check<T>,SemanticCheck<A,H,V,T>,SyntacticCheck
public interface GraphVisitor<G extends Graph<G,N,E>,N extends Node<G,N,E>,E extends Edge<G,N,E>,V>A visitor of aGraph. Instances of this interface provide callbacks to invoke when visiting the various components of a graph.
The visiting starts by visiting the graph itself throughvisit(Object, Graph), and then by visitingNodes andEdges independently, in no particular order, throughvisit(Object, Graph, Node)andvisit(Object, Graph, Edge)respectively.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanvisit(V tool, G graph)Visits a graph, inspecting its structure and signature, but without accessing its contents.booleanvisit(V tool, G graph, E edge)Visits an edge of the given graph.booleanvisit(V tool, G graph, N node)Visits a node of the given graph.
-
-
-
Method Detail
-
visit
boolean visit(V tool, G graph)
Visits a graph, inspecting its structure and signature, but without accessing its contents.- Parameters:
tool- the auxiliary tool that this visitor can usegraph- the graph being visited- Returns:
- whether or not the visiting should continue when this call
returns. If this method returns
false, the visiting will be interrupted
-
visit
boolean visit(V tool, G graph, N node)
Visits a node of the given graph.- Parameters:
tool- the auxiliary tool that this visitor can usegraph- the graph where the visited node belongsnode- the node being visited- Returns:
- whether or not the visiting should continue when this call
returns. If this method returns
false, the visiting will be interrupted
-
visit
boolean visit(V tool, G graph, E edge)
Visits an edge of the given graph.- Parameters:
tool- the auxiliary tool that this visitor can usegraph- the graph where the visited edge belongsedge- the edge being visited- Returns:
- whether or not the visiting should continue when this call
returns. If this method returns
false, the visiting will be interrupted
-
-