Package de.saar.chorus.ubench.jdomgraph
Class Fragment
java.lang.Object
de.saar.chorus.ubench.jdomgraph.Fragment
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 ClassesModifier and TypeClassDescriptionclassThis is a data storage for aFragmentto be read out by aJDomGraph. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.jgraph.graph.DefaultEdge edge) Add a solid edge to this fragment.voidadd(org.jgraph.graph.DefaultGraphCell node) Add a node to this fragment.voidAdd all nodes and edges of some other fragment to this one.booleanSet<org.jgraph.graph.DefaultEdge>getEdges()Get all edges in this fragment.org.jgraph.graph.DefaultGraphCellGet the graph cell corresponding to the entire fragment.Set<org.jgraph.graph.DefaultGraphCell>getNodes()Get all nodes in this fragment.inthashCode()intsize()Get the number of nodes in this fragment.toString()
-
Constructor Details
-
Fragment
-
-
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
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
Get all nodes in this fragment.- Returns:
- the set of all nodes.
-
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
-
equals
-
hashCode
public int hashCode()
-