|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.deploy.graph.Graph
public class Graph
Basic directed graph implementation
Constructor Summary | |
---|---|
Graph()
|
Method Summary | |
---|---|
void |
addEdge(Edge edge)
|
void |
addEdge(String from,
String to)
|
void |
addNode(Node node)
|
Set<Edge> |
findEdges(Node node)
Find all edges that are connected to the specific node, both as an outgoing Edge.getFrom() or incoming
Edge.getTo() end point. |
Set<Edge> |
findEdgesFrom(Node from)
Find all edges that are connected Edge.getFrom() the specific node. |
Set<Edge> |
getEdges()
|
Node |
getNodeByName(String name)
Get the Node by Name. |
Set<Node> |
getNodes()
|
Path |
getPath(Node from,
Node to)
Using BFS (Breadth First Search) return the path from a any arbitrary node to any other. |
Path |
getPath(String nodeNameOrigin,
String nodeNameDest)
Convenience method for getPath(Node, Node) |
void |
insertNode(Edge edge,
Node node)
Insert an arbitrary node on an existing edge. |
void |
insertNode(Edge edge,
String nodeName)
Convenience method for insertNode(Edge, Node) |
void |
removeEdge(Edge edge)
|
void |
removeEdge(String fromNodeName,
String toNodeName)
|
void |
removeNode(Node node)
|
void |
setEdges(Set<Edge> edges)
|
void |
setNodes(Set<Node> nodes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph()
Method Detail |
---|
public void addEdge(Edge edge)
public void addEdge(String from, String to)
public void addNode(Node node)
public void insertNode(Edge edge, String nodeName)
insertNode(Edge, Node)
edge
- the edge to split and insert a node intonodeName
- the name of the node to insert along the edgepublic void insertNode(Edge edge, Node node)
edge
- the edge to split and insert a node intonode
- the node to insert along the edgepublic Set<Edge> findEdges(Node node)
Edge.getFrom()
or incoming
Edge.getTo()
end point.
node
- the node with potential end points
public Set<Edge> findEdgesFrom(Node from)
Edge.getFrom()
the specific node.
from
- the node with potential edges from it
public Path getPath(String nodeNameOrigin, String nodeNameDest)
getPath(Node, Node)
nodeNameOrigin
- the name of the node to the path origin.nodeNameDest
- the name of the node to the path destination.
public Path getPath(Node from, Node to)
from
- the node fromto
- the node to
public Set<Edge> getEdges()
public Node getNodeByName(String name)
name
- the name to lookup
public Set<Node> getNodes()
public void removeEdge(Edge edge)
public void removeEdge(String fromNodeName, String toNodeName)
public void removeNode(Node node)
public void setEdges(Set<Edge> edges)
public void setNodes(Set<Node> nodes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |