* @param edge
* @throws AddEdgeException
*/
public void addEdge(T edge) throws AddEdgeException {
if (!nodeList.contains(edge.getStart()) || !nodeList.contains(edge.getEnd())){
throw new AddEdgeException("Nodes at start or end of the edge does not exist");
}
edgeList.add(edge);
}