Interface GraphListener<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Superinterfaces:
    java.util.EventListener, VertexSetListener<V>
    All Known Implementing Classes:
    ConnectivityInspector, NeighborCache

    public interface GraphListener<V,​E>
    extends VertexSetListener<V>
    A listener that is notified when the graph changes.

    If only notifications on vertex set changes are required it is more efficient to use the VertexSetListener.

    Author:
    Barak Naveh
    See Also:
    VertexSetListener
    • Method Detail

      • edgeAdded

        void edgeAdded​(GraphEdgeChangeEvent<V,​E> e)
        Notifies that an edge has been added to the graph.
        Parameters:
        e - the edge event.
      • edgeRemoved

        void edgeRemoved​(GraphEdgeChangeEvent<V,​E> e)
        Notifies that an edge has been removed from the graph.
        Parameters:
        e - the edge event.
      • edgeWeightUpdated

        default void edgeWeightUpdated​(GraphEdgeChangeEvent<V,​E> e)
        Notifies that an edge weight has been updated.
        Parameters:
        e - the edge event.