@@ -79,6 +79,8 @@ public interface Graph<V, E> {
7979 * @param v vertex for which to obtain the incident edges
8080 *
8181 * @return collection of edges
82+ *
83+ * @throws InvalidVertexException if the vertex is invalid for the graph
8284 */
8385 Collection <Edge <E , V >> incidentEdges (Vertex <V > v )
8486 throws InvalidVertexException ;
@@ -94,8 +96,8 @@ Collection<Edge<E, V>> incidentEdges(Vertex<V> v)
9496 * @param e edge connected to <code>v</code>
9597 * @return opposite vertex along <code>e</code>
9698 *
97- * @exception InvalidVertexException if the vertex is invalid for the graph
98- * @exception InvalidEdgeException if the edge is invalid for the graph
99+ * @throws InvalidVertexException if the vertex is invalid for the graph
100+ * @throws InvalidEdgeException if the edge is invalid for the graph
99101 */
100102 Vertex <V > opposite (Vertex <V > v , Edge <E , V > e )
101103 throws InvalidVertexException , InvalidEdgeException ;
@@ -109,7 +111,7 @@ Vertex<V> opposite(Vertex<V> v, Edge<E, V> e)
109111 *
110112 * @return true if they are adjacent, false otherwise.
111113 *
112- * @exception InvalidVertexException if <code>u</code> or <code>v</code>
114+ * @throws InvalidVertexException if <code>u</code> or <code>v</code>
113115 * are invalid vertices for the graph
114116 */
115117 boolean areAdjacent (Vertex <V > u , Vertex <V > v )
@@ -122,7 +124,7 @@ boolean areAdjacent(Vertex<V> u, Vertex<V> v)
122124 *
123125 * @return the reference of the newly created vertex
124126 *
125- * @exception InvalidVertexException if there already exists a vertex
127+ * @throws InvalidVertexException if there already exists a vertex
126128 * containing <code>vElement</code>
127129 * according to the equality of
128130 * {@link Object#equals(java.lang.Object) }
@@ -142,10 +144,10 @@ Vertex<V> insertVertex(V vElement)
142144 *
143145 * @return the reference for the newly created edge
144146 *
145- * @exception InvalidVertexException if <code>u</code> or <code>v</code>
147+ * @throws InvalidVertexException if <code>u</code> or <code>v</code>
146148 * are invalid vertices for the graph
147149 *
148- * @exception InvalidEdgeException if there already exists an edge
150+ * @throws InvalidEdgeException if there already exists an edge
149151 * containing <code>edgeElement</code>
150152 * according to the equality of
151153 * {@link Object#equals(java.lang.Object) }
@@ -165,14 +167,14 @@ Edge<E, V> insertEdge(Vertex<V> u, Vertex<V> v, E edgeElement)
165167 *
166168 * @return the reference for the newly created edge
167169 *
168- * @exception InvalidVertexException if <code>vElement1</code> or
170+ * @throws InvalidVertexException if <code>vElement1</code> or
169171 * <code>vElement2</code>
170172 * are not found in any vertices of the graph
171173 * according to the equality of
172174 * {@link Object#equals(java.lang.Object) }
173175 * method.
174176 *
175- * @exception InvalidEdgeException if there already exists an edge
177+ * @throws InvalidEdgeException if there already exists an edge
176178 * containing <code>edgeElement</code>
177179 * according to the equality of
178180 * {@link Object#equals(java.lang.Object) }
@@ -189,7 +191,7 @@ Edge<E, V> insertEdge(V vElement1, V vElement2, E edgeElement)
189191 *
190192 * @return element stored at the removed vertex
191193 *
192- * @exception InvalidVertexException if <code>v</code> is an invalid vertex for the graph
194+ * @throws InvalidVertexException if <code>v</code> is an invalid vertex for the graph
193195 */
194196 V removeVertex (Vertex <V > v ) throws InvalidVertexException ;
195197
@@ -200,7 +202,7 @@ Edge<E, V> insertEdge(V vElement1, V vElement2, E edgeElement)
200202 *
201203 * @return element stored at the removed edge
202204 *
203- * @exception InvalidEdgeException if <code>e</code> is an invalid edge for the graph.
205+ * @throws InvalidEdgeException if <code>e</code> is an invalid edge for the graph.
204206 */
205207 E removeEdge (Edge <E , V > e ) throws InvalidEdgeException ;
206208
@@ -213,7 +215,7 @@ Edge<E, V> insertEdge(V vElement1, V vElement2, E edgeElement)
213215 *
214216 * @return previous element previously stored in <code>v</code>
215217 *
216- * @exception InvalidVertexException if the vertex <code>v</code> is invalid for the graph, or;
218+ * @throws InvalidVertexException if the vertex <code>v</code> is invalid for the graph, or;
217219 * if there already exists another vertex containing
218220 * the element <code>newElement</code>
219221 * according to the equality of
@@ -231,7 +233,7 @@ Edge<E, V> insertEdge(V vElement1, V vElement2, E edgeElement)
231233 *
232234 * @return previous element previously stored in <code>e</code>
233235 *
234- * @exception InvalidVertexException if the edge <code>e</code> is invalid for the graph, or;
236+ * @throws InvalidEdgeException if the edge <code>e</code> is invalid for the graph, or;
235237 * if there already exists another edge containing
236238 * the element <code>newElement</code>
237239 * according to the equality of
0 commit comments