Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.deploy.graph
Class Graph

    java.lang.Object
      org.eclipse.jetty.deploy.graph.Graph

Direct Known Subclasses:
  AppLifeCycle

    public class Graph

extends java.lang.Object

Basic directed graph implementation

Constructor Summary
`Graph()`

Method Summary
`void` | `addEdge(Edge edge)`
`void` | `addEdge(java.lang.String from, java.lang.String to)`
`void` | `addNode(Node node)`
`java.util.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.
`java.util.Set<Edge>` | `findEdgesFrom(Node from)` Find all edges that are connected `Edge.getFrom()` the specific node.
`java.util.Set<Edge>` | `getEdges()`
`Node` | `getNodeByName(java.lang.String name)` Get the Node by Name.
`java.util.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(java.lang.String nodeNameOrigin, java.lang.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, java.lang.String nodeName)` Convenience method for `insertNode(Edge, Node)`
`void` | `removeEdge(Edge edge)`
`void` | `removeEdge(java.lang.String fromNodeName, java.lang.String toNodeName)`
`void` | `removeNode(Node node)`
`void` | `setEdges(java.util.Set<Edge> edges)`
`void` | `setNodes(java.util.Set<Node> nodes)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Graph

    public Graph()

Method Detail

### addEdge

    public void addEdge(Edge edge)

### addEdge

    public void addEdge(java.lang.String from,
                        java.lang.String to)

### addNode

    public void addNode(Node node)

### insertNode

    public void insertNode(Edge edge,
                           java.lang.String nodeName)

  Convenience method for `insertNode(Edge, Node)`

  Parameters:
    `edge` - the edge to split and insert a node into
    `nodeName` - the name of the node to insert along the edge

### insertNode

    public void insertNode(Edge edge,
                           Node node)

  Insert an arbitrary node on an existing edge.

  Parameters:
    `edge` - the edge to split and insert a node into
    `node` - the node to insert along the edge

### findEdges

    public java.util.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.

  Parameters:
    `node` - the node with potential end points
  Returns:
    the set of edges connected to the node

### findEdgesFrom

    public java.util.Set<Edge> findEdgesFrom(Node from)

  Find all edges that are connected `Edge.getFrom()` the specific node.

  Parameters:
    `from` - the node with potential edges from it
  Returns:
    the set of edges from the node

### getPath

    public Path getPath(java.lang.String nodeNameOrigin,
                        java.lang.String nodeNameDest)

  Convenience method for `getPath(Node, Node)`

  Parameters:
    `nodeNameOrigin` - the name of the node to the path origin.
    `nodeNameDest` - the name of the node to the path destination.
  Returns:
    the path to take

### getPath

    public Path getPath(Node from,
                        Node to)

  Using BFS (Breadth First Search) return the path from a any arbitrary node to any other.

  Parameters:
    `from` - the node from
    `to` - the node to
  Returns:
    the path to take or null if there is no path.

### getEdges

    public java.util.Set<Edge> getEdges()

### getNodeByName

    public Node getNodeByName(java.lang.String name)

  Get the Node by Name.

  Parameters:
    `name` - the name to lookup
  Returns:
    the node if found or null if not found.

### getNodes

    public java.util.Set<Node> getNodes()

### removeEdge

    public void removeEdge(Edge edge)

### removeEdge

    public void removeEdge(java.lang.String fromNodeName,
                           java.lang.String toNodeName)

### removeNode

    public void removeNode(Node node)

### setEdges

    public void setEdges(java.util.Set<Edge> edges)

### setNodes

    public void setNodes(java.util.Set<Node> nodes)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.