scratch.tom.simpleGraph
Interface Graph<V,E extends Edge>

Type Parameters:
V - the type of the vertices
E - the type of the edges
All Known Implementing Classes:
DefaultGraph

public interface Graph<V,E extends Edge>

Graph is parameterized with vertex and edge type. For example, Graph is a graph whose vertices are String instances, and whose edges are DirectedEdges containing String vertices. In other words, This particular Graph is compile time type-safe as a 'directed graph'.

Author:
Tom Nelson - RABA Technologies

Method Summary
 void addEdge(E edge)
           
 void addEdges(Collection<E> edges)
           
 void addVertex(V vertex)
           
 void addVertices(Collection<V> vertices)
           
 Collection<E> getEdges()
           
 Collection<V> getVertices()
           
 boolean removeEdge(E edge)
           
 boolean removeEdges(Collection<E> edges)
           
 boolean removeVertex(V vertex)
           
 boolean removeVertices(Collection<V> vertices)
           
 

Method Detail

addEdge

void addEdge(E edge)

addEdges

void addEdges(Collection<E> edges)

removeEdge

boolean removeEdge(E edge)

removeEdges

boolean removeEdges(Collection<E> edges)

addVertex

void addVertex(V vertex)

addVertices

void addVertices(Collection<V> vertices)

removeVertex

boolean removeVertex(V vertex)

removeVertices

boolean removeVertices(Collection<V> vertices)

getVertices

Collection<V> getVertices()

getEdges

Collection<E> getEdges()