Class Fragment

java.lang.Object
de.saar.chorus.ubench.jdomgraph.Fragment

public class Fragment extends Object
A fragment in a dominance graph. This fragment contains nodes (labelled and unlabelled) and solid edges, such that the contained nodes are all connected by the contained edges. Fragments of a dominance graph are actually computed by the computeFragments method in JDomGraph. Objects of this class can serve as popup targets, i.e. they provide a menu item for a popup menu.
Author:
Alexander Koller
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    This is a data storage for a Fragment to be read out by a JDomGraph.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.jgraph.graph.DefaultEdge edge)
    Add a solid edge to this fragment.
    void
    add(org.jgraph.graph.DefaultGraphCell node)
    Add a node to this fragment.
    void
    Add all nodes and edges of some other fragment to this one.
    boolean
    equals(Object arg0)
     
    Set<org.jgraph.graph.DefaultEdge>
    Get all edges in this fragment.
    org.jgraph.graph.DefaultGraphCell
    Get the graph cell corresponding to the entire fragment.
    Set<org.jgraph.graph.DefaultGraphCell>
    Get all nodes in this fragment.
    int
     
    int
    Get the number of nodes in this fragment.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Fragment

      public Fragment(JDomGraph parent)
  • Method Details

    • add

      public void add(org.jgraph.graph.DefaultGraphCell node)
      Add a node to this fragment.
      Parameters:
      node -
    • add

      public void add(org.jgraph.graph.DefaultEdge edge)
      Add a solid edge to this fragment.
      Parameters:
      edge -
    • addAll

      public void addAll(Fragment frag)
      Add all nodes and edges of some other fragment to this one. This is useful when two fragments are merged when computing the maximal fragments of a dominance graph.
      Parameters:
      frag -
    • getNodes

      public Set<org.jgraph.graph.DefaultGraphCell> getNodes()
      Get all nodes in this fragment.
      Returns:
      the set of all nodes.
    • getEdges

      public Set<org.jgraph.graph.DefaultEdge> getEdges()
      Get all edges in this fragment.
      Returns:
      the set of all edges.
    • size

      public int size()
      Get the number of nodes in this fragment.
      Returns:
      the number of nodes.
    • getGroupObject

      public org.jgraph.graph.DefaultGraphCell getGroupObject()
      Get the graph cell corresponding to the entire fragment. This will be a group cell to which all the nodes, primary ports, and edges (as given by getAllCells) belong.
      Returns:
      the cell.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object arg0)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object