Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30791a/src/net/sourceforge/bprocessor/model
Modified Files:
Edge.java
Log Message:
Changed split so that it returns the two edges that the edge have been split into
Index: Edge.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** Edge.java 5 Apr 2006 10:23:22 -0000 1.44
--- Edge.java 1 May 2006 09:53:39 -0000 1.45
***************
*** 309,314 ****
* accordingly.
* @param vertex The vertex
*/
! public void split(Vertex vertex) {
// FIXME Why not split a constructor?
if (!constructor) {
--- 309,316 ----
* accordingly.
* @param vertex The vertex
+ * @return a list containing the two new edges
*/
! public Collection split(Vertex vertex) {
! List added = new ArrayList();
// FIXME Why not split a constructor?
if (!constructor) {
***************
*** 317,322 ****
--- 319,326 ----
Edge e1 = new Edge(from, vertex);
getOwner().add(e1);
+ added.add(e1);
Edge e2 = new Edge(vertex, to);
getOwner().add(e2);
+ added.add(e2);
***************
*** 329,332 ****
--- 333,337 ----
getOwner().remove(this);
}
+ return added;
}
|