1: public boolean addEdge(T begin, T end, double edgeWeight) 2: { 3: boolean result = false; 4: VertexInterface<T> beginVertex = vertices.getValue(begin); 5: VertexInterface<T> endVertex = vertices.getValue(end); 6: if ( (beginVertex != null) && (endVertex != null) ) 7: result = beginVertex.connect(endVertex, edgeWeight); 8: if (result) 9: edgeCount++; 10: return result; 11: } // end addEdge 12: public boolean addEdge(T begin, T end) 13: { 14: return addEdge(begin, end, 0); 15: } // end addEdge 16: // Version 4.0