|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.fluxion.graph.AbstractGraph
public abstract class AbstractGraph
Javadocs go here.
Constructor Summary | |
---|---|
AbstractGraph()
Constructs a new DefaultGraph. |
Method Summary | |
---|---|
void |
accept(GraphVisitor visitor)
Accept a visit from a GraphVisitor. |
void |
add(Edge edge)
Adds the Edge to this graph. |
void |
add(Node node)
Adds the Node to this graph |
void |
addGraphListener(GraphListener listener)
Add a GraphListener to report on changes to the Graph. |
void |
cascadeChanges()
Cascades any changes made to this graph down to the underlying object model. |
boolean |
contains(Edge edge)
Returns true if this graph contains the given edge, or false otherwise |
boolean |
contains(Node node)
Returns true if this graph contains the given Node, or false otherwise |
java.util.Set<Node> |
getAllNodes()
Returns every Node present within this graph |
java.util.Collection<Edge> |
getLeadingEdges(Node node)
Returns the set of edges leading into a given node. |
java.lang.String |
getName()
Gets the name of this graph |
Node |
getNode(java.lang.String name)
Returns the Node with the given name present within this graph. |
java.util.Set<Node> |
getRootNodes()
Returns all the nodes which are "root" nodes of this graph. |
java.util.Set<Edge> |
getTailingEdges(Node node)
Returns the set of edges which lead out of the given node. |
void |
remove(Edge edge)
Removes this Edge from the graph. |
void |
remove(Node node)
Removes the Node from this graph. |
void |
removeAll()
Removes all Nodes and Edges from this graph |
void |
removeGraphListener(GraphListener listener)
Remove a GraphListener from the Graph |
void |
setAsRoot(Node node)
Sets this node as the root. |
void |
setName(java.lang.String name)
Sets the name of this graph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractGraph()
Method Detail |
---|
public java.lang.String getName()
Graph
getName
in interface Graph
public void setName(java.lang.String name)
Graph
setName
in interface Graph
name
- the name of the graphpublic void add(Node node)
Graph
add
in interface Graph
node
- the Node
to be addedpublic void remove(Node node)
Graph
remove
in interface Graph
node
- the Node
to be removedpublic void add(Edge edge)
Graph
add
in interface Graph
edge
- the Edge
to be addedpublic void remove(Edge edge)
Graph
remove
in interface Graph
edge
- the Edge
to be removedpublic void removeAll()
Graph
removeAll
in interface Graph
public boolean contains(Node node)
Graph
contains
in interface Graph
node
- check if this Node
exists in the graph
public boolean contains(Edge edge)
Graph
contains
in interface Graph
edge
- check if this Edge
exists in the graph
public void setAsRoot(Node node)
Graph
setAsRoot
in interface Graph
node
- the Node
to set as a root node.public java.util.Set<Node> getRootNodes()
Graph
getRootNodes
in interface Graph
public java.util.Collection<Edge> getLeadingEdges(Node node)
Graph
getLeadingEdges
in interface Graph
node
- all edges leading into a node
public java.util.Set<Edge> getTailingEdges(Node node)
Graph
getTailingEdges
in interface Graph
node
- gets all tailing edges leading out of this Node
public Node getNode(java.lang.String name)
Graph
getNode
in interface Graph
name
- the node name
public java.util.Set<Node> getAllNodes()
Graph
getAllNodes
in interface Graph
public void cascadeChanges()
Graph
cascadeChanges
in interface Graph
public void accept(GraphVisitor visitor)
Graph
accept
in interface Graph
visitor
- the GraphVisitor
visiting this graphpublic void addGraphListener(GraphListener listener)
Graph
addGraphListener
in interface Graph
listener
- the listener to addpublic void removeGraphListener(GraphListener listener)
Graph
removeGraphListener
in interface Graph
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |