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

java.lang.Object
edu.uci.ics.jung.graph.AbstractGraph<V,E>
edu.uci.ics.jung.graph.AbstractTypedGraph<V,E>
edu.uci.ics.jung.graph.DirectedSparseGraph<V,E>
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>, GImplicitDirectedGraph<V,E>, VisualGraph<V,E>, 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:
  • Constructor Details

    • GroupingVisualGraph

      public GroupingVisualGraph()
  • Method Details

    • 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, 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