Package org.jgrapht.event
Class TraversalListenerAdapter<V,E>
- java.lang.Object
-
- org.jgrapht.event.TraversalListenerAdapter<V,E>
-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
TraversalListener<V,E>
public class TraversalListenerAdapter<V,E> extends java.lang.Object implements TraversalListener<V,E>
An empty do-nothing implementation of theTraversalListenerinterface used for subclasses.- Author:
- Barak Naveh
-
-
Constructor Summary
Constructors Constructor Description TraversalListenerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectedComponentFinished(ConnectedComponentTraversalEvent e)Called to inform listeners that the traversal of the current connected component has finished.voidconnectedComponentStarted(ConnectedComponentTraversalEvent e)Called to inform listeners that a traversal of a new connected component has started.voidedgeTraversed(EdgeTraversalEvent<E> e)Called to inform the listener that the specified edge have been visited during the graph traversal.voidvertexFinished(VertexTraversalEvent<V> e)Called to inform the listener that the specified vertex have been finished during the graph traversal.voidvertexTraversed(VertexTraversalEvent<V> e)Called to inform the listener that the specified vertex have been visited during the graph traversal.
-
-
-
Method Detail
-
connectedComponentFinished
public void connectedComponentFinished(ConnectedComponentTraversalEvent e)
Description copied from interface:TraversalListenerCalled to inform listeners that the traversal of the current connected component has finished.- Specified by:
connectedComponentFinishedin interfaceTraversalListener<V,E>- Parameters:
e- the traversal event.- See Also:
TraversalListener.connectedComponentFinished(ConnectedComponentTraversalEvent)
-
connectedComponentStarted
public void connectedComponentStarted(ConnectedComponentTraversalEvent e)
Description copied from interface:TraversalListenerCalled to inform listeners that a traversal of a new connected component has started.- Specified by:
connectedComponentStartedin interfaceTraversalListener<V,E>- Parameters:
e- the traversal event.- See Also:
TraversalListener.connectedComponentStarted(ConnectedComponentTraversalEvent)
-
edgeTraversed
public void edgeTraversed(EdgeTraversalEvent<E> e)
Description copied from interface:TraversalListenerCalled to inform the listener that the specified edge have been visited during the graph traversal. Depending on the traversal algorithm, edge might be visited more than once.- Specified by:
edgeTraversedin interfaceTraversalListener<V,E>- Parameters:
e- the edge traversal event.- See Also:
TraversalListener.edgeTraversed(EdgeTraversalEvent)
-
vertexTraversed
public void vertexTraversed(VertexTraversalEvent<V> e)
Description copied from interface:TraversalListenerCalled to inform the listener that the specified vertex have been visited during the graph traversal. Depending on the traversal algorithm, vertex might be visited more than once.- Specified by:
vertexTraversedin interfaceTraversalListener<V,E>- Parameters:
e- the vertex traversal event.- See Also:
TraversalListener.vertexTraversed(VertexTraversalEvent)
-
vertexFinished
public void vertexFinished(VertexTraversalEvent<V> e)
Description copied from interface:TraversalListenerCalled to inform the listener that the specified vertex have been finished during the graph traversal. Exact meaning of "finish" is algorithm-dependent; e.g. for DFS, it means that all vertices reachable via the vertex have been visited as well.- Specified by:
vertexFinishedin interfaceTraversalListener<V,E>- Parameters:
e- the vertex traversal event.- See Also:
TraversalListener.vertexFinished(VertexTraversalEvent)
-
-