at.jku.ssw
Class Graph

java.lang.Object
  extended by at.jku.ssw.Graph

public class Graph
extends java.lang.Object

A graph of character vertices.


Field Summary
 java.util.List edges
           
 java.util.List vertices
           
 
Constructor Summary
Graph()
          Creates an empty graph.
 
Method Summary
 void addEdge(Edge edge)
          Adds an edge to the graph.
 void addVertex(Vertex vertex)
          Adds a vertex to the graph.
 Edge getEdge(Vertex start, Vertex end)
          Returns the edge between the start and the end vertex.
 Edge[] getEdges(Vertex vertex)
          Returns the outgoing edges for a vertex.
 Vertex getRoot()
          Returns the root vertex of the graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vertices

public final java.util.List vertices

edges

public java.util.List edges
Constructor Detail

Graph

public Graph()
Creates an empty graph.

Method Detail

addVertex

public void addVertex(Vertex vertex)
Adds a vertex to the graph.


getRoot

public Vertex getRoot()
Returns the root vertex of the graph.


addEdge

public void addEdge(Edge edge)
Adds an edge to the graph.


getEdges

public Edge[] getEdges(Vertex vertex)
Returns the outgoing edges for a vertex.


getEdge

public Edge getEdge(Vertex start,
                    Vertex end)
Returns the edge between the start and the end vertex.