Class GroupingVisualGraph<V extends VisualVertex,​E extends VisualEdge<V>>

  • Type Parameters:
    V - the vertex type
    E - the edge type
    All Implemented Interfaces:
    edu.uci.ics.jung.graph.DirectedGraph<V,​E>, edu.uci.ics.jung.graph.Graph<V,​E>, edu.uci.ics.jung.graph.Hypergraph<V,​E>, GDirectedGraph<V,​E>, VisualGraph<V,​E>, java.io.Serializable

    public abstract class GroupingVisualGraph<V extends VisualVertex,​E extends VisualEdge<V>>
    extends DefaultVisualGraph<V,​E>
    A visual graph with methods needed to facilitate grouping of vertices.
    See Also:
    Serialized Form
    • Constructor Detail

      • GroupingVisualGraph

        public GroupingVisualGraph()
    • Method Detail

      • findMatchingVertex

        public abstract V findMatchingVertex​(V v)
        Finds a vertex that matches the given vertex.

        Grouping can trigger vertex adds and removals. This method is a way for subclasses to search for a vertex that matches the given vertex, but may or may not be the same instance.

        Parameters:
        v - the vertex
        Returns:
        the matching vertex or null
      • findMatchingVertex

        public abstract V findMatchingVertex​(V v,
                                             java.util.Collection<V> ignore)
        The same as findMatchingVertex(VisualVertex), except that you can provide a collection of vertices to be ignored.

        This is useful during graph transformations when duplicate vertices may be in the graph at the same time.

        Parameters:
        v - the vertex
        ignore - vertices to ignore when searching
        Returns:
        the matching vertex or null