|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.emf.wrappers.EObjectGraphImpl
public class EObjectGraphImpl
An in-memory representation of a graph of EObjects. This class is often more convenient for client-side programming than the "raw" EMF-generated graph implementation.
| Constructor Summary | |
|---|---|
EObjectGraphImpl()
|
|
| Method Summary | |
|---|---|
void |
addEdge(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject dst)
|
void |
addNode(org.eclipse.emf.ecore.EObject n)
add a node to this graph |
boolean |
containsNode(org.eclipse.emf.ecore.EObject N)
|
boolean |
equals(java.lang.Object obj)
|
org.eclipse.emf.ecore.EObject |
export()
|
static EObjectGraph |
fromEMF(EGraph g)
|
int |
getMaxNumber()
|
org.eclipse.emf.ecore.EObject |
getNode(int number)
|
int |
getNumber(org.eclipse.emf.ecore.EObject N)
|
int |
getNumberOfNodes()
|
int |
getPredNodeCount(org.eclipse.emf.ecore.EObject N)
Return the number of immediate predecessor
nodes of this Node
in the Graph. |
IntSet |
getPredNodeNumbers(org.eclipse.emf.ecore.EObject node)
|
java.util.Iterator<? extends org.eclipse.emf.ecore.EObject> |
getPredNodes(org.eclipse.emf.ecore.EObject N)
Return an Iterator over the immediate predecessor nodes of this Node
in the Graph. |
int |
getSuccNodeCount(org.eclipse.emf.ecore.EObject N)
Return the number of immediate successor
nodes of this Node
in the Graph |
IntSet |
getSuccNodeNumbers(org.eclipse.emf.ecore.EObject node)
|
java.util.Iterator<? extends org.eclipse.emf.ecore.EObject> |
getSuccNodes(org.eclipse.emf.ecore.EObject N)
Return an Iterator over the immediate successor nodes of this Node in
the Graph |
boolean |
hasEdge(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject dst)
|
int |
hashCode()
|
java.util.Iterator<org.eclipse.emf.ecore.EObject> |
iterateNodes(IntSet s)
|
java.util.Iterator<org.eclipse.emf.ecore.EObject> |
iterator()
|
void |
removeAllIncidentEdges(org.eclipse.emf.ecore.EObject node)
|
void |
removeEdge(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject dst)
|
void |
removeIncomingEdges(org.eclipse.emf.ecore.EObject node)
|
void |
removeNode(org.eclipse.emf.ecore.EObject n)
remove a node from this graph |
void |
removeNodeAndEdges(org.eclipse.emf.ecore.EObject N)
remove a node and all its incident edges |
void |
removeOutgoingEdges(org.eclipse.emf.ecore.EObject node)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EObjectGraphImpl()
| Method Detail |
|---|
public void addEdge(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject dst)
throws java.lang.IllegalArgumentException
addEdge in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
public void removeEdge(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject dst)
throws java.lang.IllegalArgumentException
removeEdge in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentExceptionpublic void addNode(org.eclipse.emf.ecore.EObject n)
NodeManager
addNode in interface NodeManager<org.eclipse.emf.ecore.EObject>public boolean containsNode(org.eclipse.emf.ecore.EObject N)
containsNode in interface NodeManager<org.eclipse.emf.ecore.EObject>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int getNumberOfNodes()
getNumberOfNodes in interface NodeManager<org.eclipse.emf.ecore.EObject>
public int getPredNodeCount(org.eclipse.emf.ecore.EObject N)
throws java.lang.IllegalArgumentException
EdgeManagerimmediate predecessor
nodes of this Node
in the Graph.
getPredNodeCount in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
public java.util.Iterator<? extends org.eclipse.emf.ecore.EObject> getPredNodes(org.eclipse.emf.ecore.EObject N)
throws java.lang.IllegalArgumentException
EdgeManagernodes of this Node
in the Graph.
This method never returns null.
getPredNodes in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
public int getSuccNodeCount(org.eclipse.emf.ecore.EObject N)
throws java.lang.IllegalArgumentException
EdgeManagerimmediate successor
nodes of this Node
in the Graph
getSuccNodeCount in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
public java.util.Iterator<? extends org.eclipse.emf.ecore.EObject> getSuccNodes(org.eclipse.emf.ecore.EObject N)
throws java.lang.IllegalArgumentException
EdgeManagernodes of this Node in
the Graph
This method never returns null.
getSuccNodes in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.Iterator<org.eclipse.emf.ecore.EObject> iterator()
iterator in interface NodeManager<org.eclipse.emf.ecore.EObject>iterator in interface java.lang.Iterable<org.eclipse.emf.ecore.EObject>
public void removeAllIncidentEdges(org.eclipse.emf.ecore.EObject node)
throws java.lang.IllegalArgumentException
removeAllIncidentEdges in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentExceptionpublic void removeNode(org.eclipse.emf.ecore.EObject n)
NodeManager
removeNode in interface NodeManager<org.eclipse.emf.ecore.EObject>
public void removeNodeAndEdges(org.eclipse.emf.ecore.EObject N)
throws java.lang.IllegalArgumentException
Graph
removeNodeAndEdges in interface Graph<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public void removeIncomingEdges(org.eclipse.emf.ecore.EObject node)
throws java.lang.IllegalArgumentException
removeIncomingEdges in interface EdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
public void removeOutgoingEdges(org.eclipse.emf.ecore.EObject node)
throws java.lang.IllegalArgumentException
removeOutgoingEdges in interface EdgeManager<org.eclipse.emf.ecore.EObject>node -
java.lang.IllegalArgumentExceptionpublic int getMaxNumber()
getMaxNumber in interface NumberedNodeManager<org.eclipse.emf.ecore.EObject>public org.eclipse.emf.ecore.EObject getNode(int number)
getNode in interface NumberedNodeManager<org.eclipse.emf.ecore.EObject>public int getNumber(org.eclipse.emf.ecore.EObject N)
getNumber in interface NumberedNodeManager<org.eclipse.emf.ecore.EObject>public java.util.Iterator<org.eclipse.emf.ecore.EObject> iterateNodes(IntSet s)
iterateNodes in interface NumberedNodeManager<org.eclipse.emf.ecore.EObject>public static EObjectGraph fromEMF(EGraph g)
g - an EMF implementation of a graph
java.lang.IllegalArgumentException - if g is nullpublic org.eclipse.emf.ecore.EObject export()
public boolean hasEdge(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject dst)
hasEdge in interface EdgeManager<org.eclipse.emf.ecore.EObject>
public IntSet getSuccNodeNumbers(org.eclipse.emf.ecore.EObject node)
throws java.lang.IllegalArgumentException
getSuccNodeNumbers in interface NumberedEdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
public IntSet getPredNodeNumbers(org.eclipse.emf.ecore.EObject node)
throws java.lang.IllegalArgumentException
getPredNodeNumbers in interface NumberedEdgeManager<org.eclipse.emf.ecore.EObject>java.lang.IllegalArgumentException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||